diff options
author | Rémy Coutable <remy@rymai.me> | 2016-09-22 14:19:29 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-09-22 14:19:29 +0300 |
commit | 2450625bbc1a9838b4ab76b652dfa1899c777927 (patch) | |
tree | cca2586ada914e0d4793e0d56d3f7fa6c540b2ac /spec | |
parent | a41df736a77ee8a0ae362d7ea3d63ffd84203d1c (diff) | |
parent | 7458126111fab210974edb6e59cd722bee248088 (diff) |
Merge branch '22417-api-fork-fix' into 'master'
API: Return 404 when trying to fork to unaccessible namespace
Closes #22417
See merge request !6452
Diffstat (limited to 'spec')
-rw-r--r-- | spec/requests/api/fork_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/requests/api/fork_spec.rb b/spec/requests/api/fork_spec.rb index 06e3a2183c0..34f84f78952 100644 --- a/spec/requests/api/fork_spec.rb +++ b/spec/requests/api/fork_spec.rb @@ -94,7 +94,7 @@ describe API::API, api: true do it 'fails if trying to fork to another user when not admin' do post api("/projects/fork/#{project.id}", user2), namespace: admin.namespace.id - expect(response).to have_http_status(409) + expect(response).to have_http_status(404) end it 'fails if trying to fork to non-existent namespace' do @@ -114,7 +114,7 @@ describe API::API, api: true do it 'fails to fork to not owned group' do post api("/projects/fork/#{project.id}", user2), namespace: group.name - expect(response).to have_http_status(409) + expect(response).to have_http_status(404) end it 'forks to not owned group when admin' do |