summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorPawel Chojnacki <pawel@chojnacki.ws>2017-06-20 15:53:55 +0200
committerPawel Chojnacki <pawel@chojnacki.ws>2017-06-20 16:09:38 +0200
commit19812e3eca7be2ffebf63b5ccb97cd7c60781c78 (patch)
treed591a140562a1df66d0b5432ac3435d104adc363 /spec
parent15b7b9ec4117bf19168ea0f923ea11e926edcc5c (diff)
downloadgitlab-ce-19812e3eca7be2ffebf63b5ccb97cd7c60781c78.tar.gz
Make queries not die when underlying data cannot be found
Diffstat (limited to 'spec')
-rw-r--r--spec/controllers/projects/deployments_controller_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/controllers/projects/deployments_controller_spec.rb b/spec/controllers/projects/deployments_controller_spec.rb
index 4a77d4d8289..0dbfcf97f6f 100644
--- a/spec/controllers/projects/deployments_controller_spec.rb
+++ b/spec/controllers/projects/deployments_controller_spec.rb
@@ -141,7 +141,7 @@ describe Projects::DeploymentsController do
end
it 'returns a empty response 204 response' do
- get :additional_metrics, deployment_params(id: deployment.id)
+ get :additional_metrics, deployment_params(id: deployment.id, format: :json)
expect(response).to have_http_status(204)
expect(response.body).to eq('')
end
@@ -161,7 +161,7 @@ describe Projects::DeploymentsController do
end
it 'returns a metrics JSON document' do
- get :additional_metrics, deployment_params(id: deployment.id)
+ get :additional_metrics, deployment_params(id: deployment.id, format: :json)
expect(response).to be_ok
expect(json_response['success']).to be(true)