diff options
author | James Lopez <james@jameslopez.es> | 2018-02-22 13:54:19 +0100 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2018-02-23 14:02:40 +0100 |
commit | 0767861bcdc62cedf374c6a4b53d8526efb4ff58 (patch) | |
tree | 3e6d866497ba45ac0cafcbf3963cf7f6979b4dfd /spec/helpers | |
parent | 228b757d29a141c4fda0e7c4be75784a6cefe427 (diff) | |
download | gitlab-ce-0767861bcdc62cedf374c6a4b53d8526efb4ff58.tar.gz |
refactor code based on feedback
Diffstat (limited to 'spec/helpers')
-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 d1968eac3e3..0548e71c89d 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_element(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_element(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_element(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_element(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 |