diff options
author | Nick Thomas <nick@gitlab.com> | 2016-11-15 15:02:44 +0000 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2016-11-16 14:30:56 +0000 |
commit | 1c994dbc05c147714479288126742f3fee158fd8 (patch) | |
tree | a100d59b32ec3a0b7323d7f958a246c668bc5286 /spec/models | |
parent | 689786975afac6f56e66f77f01f1b1565a021930 (diff) | |
download | gitlab-ce-1c994dbc05c147714479288126742f3fee158fd8.tar.gz |
Fix POST /internal/allowed to cope with gitlab-shell v4.0.0 project paths
gitlab-shell v3.6.6 would give project paths like so:
* namespace/project
gitlab-shell v4.0.0 can give project paths like so:
* /namespace1/namespace2/project
* /namespace/project
* /path/to/repository/storage/namespace1/namespace2/project
* /path/to/repository/storage/namespace/project
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/repository_spec.rb | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb index fe26b4ac18c..c93ec08b822 100644 --- a/spec/models/repository_spec.rb +++ b/spec/models/repository_spec.rb @@ -1534,14 +1534,4 @@ describe Repository, models: true do end.to raise_error(Repository::CommitError) end end - - describe '#remove_storage_from_path' do - let(:storage_path) { project.repository_storage_path } - let(:project_path) { project.path_with_namespace } - let(:full_path) { File.join(storage_path, project_path) } - - it { expect(Repository.remove_storage_from_path(full_path)).to eq(project_path) } - it { expect(Repository.remove_storage_from_path(project_path)).to eq(project_path) } - it { expect(Repository.remove_storage_from_path(storage_path)).to eq('') } - end end |