From 54365ecc7aefede64f73fa36acd651336ffa095f Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Wed, 17 Jun 2015 17:23:16 -0400 Subject: Remove overridden `link_to` helper The purpose for this override is now handled by `ExternalLinkFilter`. --- spec/helpers/application_helper_spec.rb | 37 --------------------------------- 1 file changed, 37 deletions(-) (limited to 'spec/helpers/application_helper_spec.rb') diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb index 47e10197f5c..f4bcfe8932a 100644 --- a/spec/helpers/application_helper_spec.rb +++ b/spec/helpers/application_helper_spec.rb @@ -203,43 +203,6 @@ describe ApplicationHelper do end end - describe 'link_to' do - it 'should not include rel=nofollow for internal links' do - expect(link_to('Home', root_path)).to eq('Home') - end - - it 'should include rel=nofollow for external links' do - expect(link_to('Example', 'http://www.example.com')). - to eq 'Example' - end - - it 'should include rel=nofollow for external links and honor existing html_options' do - expect(link_to('Example', 'http://www.example.com', class: 'toggle', data: {toggle: 'dropdown'})) - .to eq 'Example' - end - - it 'should include rel=nofollow for external links and preserve other rel values' do - expect(link_to('Example', 'http://www.example.com', rel: 'noreferrer')) - .to eq 'Example' - end - - it 'should not include rel=nofollow for external links on the same host as GitLab' do - expect(Gitlab.config.gitlab).to receive(:host).and_return('example.foo') - expect(link_to('Example', 'http://example.foo/bar')). - to eq 'Example' - end - - it 'should not raise an error when given a bad URI' do - expect { link_to('default', 'if real=1 RANDOM; if real>1 IDLHS; if real>500 LHS') }. - not_to raise_error - end - - it 'should not raise an error when given a bad mailto URL' do - expect { link_to('email', 'mailto://foo.bar@example.es?subject=Subject%20Line') }. - not_to raise_error - end - end - describe 'render_markup' do let(:content) { 'Noël' } -- cgit v1.2.1