diff options
author | Robert Speicher <rspeicher@gmail.com> | 2018-09-14 15:36:40 -0500 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2018-09-14 15:36:40 -0500 |
commit | 14a27a4f40d837d5ce690107cf4f97b9907d2b2a (patch) | |
tree | 7bda103f10def88b4fdd21f7565d658fbfd5c448 /spec/features/projects/blobs/blob_show_spec.rb | |
parent | 165e9a99c0363934e7676f3968e974af73c6cf95 (diff) | |
download | gitlab-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/features/projects/blobs/blob_show_spec.rb')
-rw-r--r-- | spec/features/projects/blobs/blob_show_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/features/projects/blobs/blob_show_spec.rb b/spec/features/projects/blobs/blob_show_spec.rb index 2ba4d4918ff..e2f9e7e9cc5 100644 --- a/spec/features/projects/blobs/blob_show_spec.rb +++ b/spec/features/projects/blobs/blob_show_spec.rb @@ -533,7 +533,7 @@ describe 'File blob', :js do expect(page).to have_content('This project is licensed under the MIT License.') # shows a learn more link - expect(page).to have_link('Learn more', 'http://choosealicense.com/licenses/mit/') + expect(page).to have_link('Learn more', href: 'http://choosealicense.com/licenses/mit/') end end end @@ -566,10 +566,10 @@ describe 'File blob', :js do expect(page).to have_content('This project manages its dependencies using RubyGems and defines a gem named activerecord.') # shows a link to the gem - expect(page).to have_link('activerecord', 'https://rubygems.org/gems/activerecord') + expect(page).to have_link('activerecord', href: 'https://rubygems.org/gems/activerecord') # shows a learn more link - expect(page).to have_link('Learn more', 'http://choosealicense.com/licenses/mit/') + expect(page).to have_link('Learn more', href: 'https://rubygems.org/') end end end |