diff options
Diffstat (limited to 'spec/support/shared_examples/requests/api/status_shared_examples.rb')
-rw-r--r-- | spec/support/shared_examples/requests/api/status_shared_examples.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/support/shared_examples/requests/api/status_shared_examples.rb b/spec/support/shared_examples/requests/api/status_shared_examples.rb index ed9964fa108..d5845863a58 100644 --- a/spec/support/shared_examples/requests/api/status_shared_examples.rb +++ b/spec/support/shared_examples/requests/api/status_shared_examples.rb @@ -13,7 +13,7 @@ shared_examples_for '400 response' do end it 'returns 400' do - expect(response).to have_gitlab_http_status(400) + expect(response).to have_gitlab_http_status(:bad_request) if message.present? expect(json_response['message']).to eq(message) @@ -28,7 +28,7 @@ shared_examples_for '403 response' do end it 'returns 403' do - expect(response).to have_gitlab_http_status(403) + expect(response).to have_gitlab_http_status(:forbidden) end end @@ -41,7 +41,7 @@ shared_examples_for '404 response' do end it 'returns 404' do - expect(response).to have_gitlab_http_status(404) + expect(response).to have_gitlab_http_status(:not_found) expect(json_response).to be_an Object if message.present? @@ -60,7 +60,7 @@ shared_examples_for '412 response' do end it 'returns 412 with a JSON error' do - expect(response).to have_gitlab_http_status(412) + expect(response).to have_gitlab_http_status(:precondition_failed) expect(json_response).to eq('message' => '412 Precondition Failed') end end |