summaryrefslogtreecommitdiff
path: root/spec/views/help
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2018-09-14 15:36:40 -0500
committerRobert Speicher <rspeicher@gmail.com>2018-09-14 15:36:40 -0500
commit14a27a4f40d837d5ce690107cf4f97b9907d2b2a (patch)
tree7bda103f10def88b4fdd21f7565d658fbfd5c448 /spec/views/help
parent165e9a99c0363934e7676f3968e974af73c6cf95 (diff)
downloadgitlab-ce-14a27a4f40d837d5ce690107cf4f97b9907d2b2a.tar.gz
Correct usage of the have_link matcher
The second option to this matcher should be an options hash; anything else is just ignored, which can lead to false positives in tests. We see one such false positive in the "Learn more" link test in `spec/features/projects/blobs/blob_show_spec.rb`.
Diffstat (limited to 'spec/views/help')
-rw-r--r--spec/views/help/index.html.haml_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/views/help/index.html.haml_spec.rb b/spec/views/help/index.html.haml_spec.rb
index 836d452304c..4b4de540d9e 100644
--- a/spec/views/help/index.html.haml_spec.rb
+++ b/spec/views/help/index.html.haml_spec.rb
@@ -21,7 +21,7 @@ describe 'help/index' do
render
expect(rendered).to match '8.0.2'
- expect(rendered).to have_link('abcdefg', 'https://gitlab.com/gitlab-org/gitlab-ce/commits/abcdefg')
+ expect(rendered).to have_link('abcdefg', href: 'https://gitlab.com/gitlab-org/gitlab-ce/commits/abcdefg')
end
end
@@ -29,7 +29,7 @@ describe 'help/index' do
it 'is visible to guests' do
render
- expect(rendered).to have_link(nil, help_instance_configuration_url)
+ expect(rendered).to have_link(nil, href: help_instance_configuration_url)
end
end