diff options
author | Gabriel Mazetto <brodock@gmail.com> | 2017-08-23 01:19:35 +0200 |
---|---|---|
committer | Gabriel Mazetto <brodock@gmail.com> | 2017-08-25 20:06:06 +0200 |
commit | 8f178c4222d917b5f2878beb97642bff0ee5345e (patch) | |
tree | f847ee3933703922b4785ec3adb969c57250cd05 /spec/helpers | |
parent | ce89c425fe51d2317322350bbd8a364c08d97d21 (diff) | |
download | gitlab-ce-8f178c4222d917b5f2878beb97642bff0ee5345e.tar.gz |
Prevent new / renamed project from using a repository path that already exists on disk
There are some redundancies in the validation steps, and that is to
preserve current error messages behavior
Also few specs have to be changed in order to fix madness in validation
logic.
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/blob_helper_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/helpers/blob_helper_spec.rb b/spec/helpers/blob_helper_spec.rb index c654151564e..04620f6d88c 100644 --- a/spec/helpers/blob_helper_spec.rb +++ b/spec/helpers/blob_helper_spec.rb @@ -95,13 +95,13 @@ describe BlobHelper do it 'returns a link with the proper route' do link = edit_blob_link(project, 'master', 'README.md') - expect(Capybara.string(link).find_link('Edit')[:href]).to eq('/gitlab/gitlabhq/edit/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 }) - expect(Capybara.string(link).find_link('Edit')[:href]).to eq('/gitlab/gitlabhq/edit/master/README.md?mr_id=10') + expect(Capybara.string(link).find_link('Edit')[:href]).to eq("/#{project.full_path}/edit/master/README.md?mr_id=10") end end |