Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-06-22 13:26:41 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-06-22 13:26:41 +0300
commit6c4d48b8b9219941218b5abdbf95acc10ff54dea (patch)
tree005f75beed45d24476c7092f7dff85536a317f24 /spec/helpers
parent9179dc6dc80a5178f4b1de9373b9e4c764485304 (diff)
parent54365ecc7aefede64f73fa36acd651336ffa095f (diff)
Merge branch 'rs-remove-link-to-override'
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> Conflicts: spec/helpers/application_helper_spec.rb
Diffstat (limited to 'spec/helpers')
-rw-r--r--spec/helpers/application_helper_spec.rb37
1 files changed, 0 insertions, 37 deletions
diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb
index a62c801e6a2..1297e789793 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('<a href="/">Home</a>')
- end
-
- it 'should include rel=nofollow for external links' do
- expect(link_to('Example', 'http://www.example.com')).
- to eq '<a href="http://www.example.com" rel="nofollow">Example</a>'
- 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 '<a class="toggle" data-toggle="dropdown" href="http://www.example.com" rel="nofollow">Example</a>'
- 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 '<a href="http://www.example.com" rel="noreferrer nofollow">Example</a>'
- 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 '<a href="http://example.foo/bar">Example</a>'
- 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 'time_ago_with_tooltip' do
def element(*arguments)
Time.zone = 'UTC'