diff options
author | Douwe Maan <douwe@gitlab.com> | 2018-02-26 18:03:21 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-02-26 18:03:21 +0300 |
commit | 2e59b4ea15f819d3b41140bf15a8e95a4a760cd3 (patch) | |
tree | 82f9b1c5480421cc861c97cae7c292943d9d20c7 /spec | |
parent | 77097c9196da7c43d1102249da1d40446176f803 (diff) | |
parent | c888e73bc6bf7c89c551a45e579a3b319d435d21 (diff) |
Merge branch '41255-refactoring-of-blob-link-methods-in-blob_helper' into 'master'
Resolve "Refactoring of blob link methods in blob_helper"
Closes #41255
See merge request gitlab-org/gitlab-ce!16851
Diffstat (limited to 'spec')
-rw-r--r-- | spec/helpers/blob_helper_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/helpers/blob_helper_spec.rb b/spec/helpers/blob_helper_spec.rb index a030796c54e..1fa194fe1b8 100644 --- a/spec/helpers/blob_helper_spec.rb +++ b/spec/helpers/blob_helper_spec.rb @@ -86,7 +86,7 @@ describe BlobHelper do it 'verifies blob is text' do expect(helper).not_to receive(:blob_text_viewable?) - button = edit_blob_link(project, 'refs/heads/master', 'README.md') + button = edit_blob_button(project, 'refs/heads/master', 'README.md') expect(button).to start_with('<button') end @@ -96,17 +96,17 @@ describe BlobHelper do expect(project.repository).not_to receive(:blob_at) - edit_blob_link(project, 'refs/heads/master', 'README.md', blob: blob) + edit_blob_button(project, 'refs/heads/master', 'README.md', blob: blob) end it 'returns a link with the proper route' do - link = edit_blob_link(project, 'master', 'README.md') + link = edit_blob_button(project, 'master', 'README.md') expect(Capybara.string(link).find_link('Edit')[:href]).to eq("/#{project.full_path}/edit/master/README.md") end it 'returns a link with the passed link_opts on the expected route' do - link = edit_blob_link(project, 'master', 'README.md', link_opts: { mr_id: 10 }) + link = edit_blob_button(project, 'master', 'README.md', link_opts: { mr_id: 10 }) expect(Capybara.string(link).find_link('Edit')[:href]).to eq("/#{project.full_path}/edit/master/README.md?mr_id=10") end |