diff options
author | Oswaldo <oswaldo@gitlab.com> | 2017-02-22 20:37:13 +0300 |
---|---|---|
committer | Oswaldo Ferreira <oswaldo@gitlab.com> | 2017-02-24 01:55:13 +0300 |
commit | 2b001d9e7a2136a6d670576843a953115a5c7c25 (patch) | |
tree | 37fbbc6ed8001b30bc9939045d0e9e7695837dba /spec/requests/api/branches_spec.rb | |
parent | 2fb3fcf0c0446c9a1568e26e81d49f3b5ce159dc (diff) |
Return 202 with JSON body on async removals on V4 API
Diffstat (limited to 'spec/requests/api/branches_spec.rb')
-rw-r--r-- | spec/requests/api/branches_spec.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/requests/api/branches_spec.rb b/spec/requests/api/branches_spec.rb index 5571f6cc107..cacdb21c692 100644 --- a/spec/requests/api/branches_spec.rb +++ b/spec/requests/api/branches_spec.rb @@ -360,9 +360,11 @@ describe API::Branches, api: true do allow_any_instance_of(Repository).to receive(:rm_branch).and_return(true) end - it 'returns 200' do + it 'returns 202 with json body' do delete api("/projects/#{project.id}/repository/merged_branches", user) - expect(response).to have_http_status(200) + + expect(response).to have_http_status(202) + expect(json_response['message']).to eql('202 Accepted') end it 'returns a 403 error if guest' do |