summaryrefslogtreecommitdiff
path: root/spec/requests/api/lint_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/requests/api/lint_spec.rb')
-rw-r--r--spec/requests/api/lint_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/requests/api/lint_spec.rb b/spec/requests/api/lint_spec.rb
index 46d23bd16b9..5815ce07125 100644
--- a/spec/requests/api/lint_spec.rb
+++ b/spec/requests/api/lint_spec.rb
@@ -12,7 +12,7 @@ describe API::Lint do
it 'passes validation' do
post api('/ci/lint'), params: { content: yaml_content }
- expect(response).to have_gitlab_http_status(200)
+ expect(response).to have_gitlab_http_status(:ok)
expect(json_response).to be_an Hash
expect(json_response['status']).to eq('valid')
expect(json_response['errors']).to eq([])
@@ -23,7 +23,7 @@ describe API::Lint do
it 'responds with errors about invalid syntax' do
post api('/ci/lint'), params: { content: 'invalid content' }
- expect(response).to have_gitlab_http_status(200)
+ expect(response).to have_gitlab_http_status(:ok)
expect(json_response['status']).to eq('invalid')
expect(json_response['errors']).to eq(['Invalid configuration format'])
end
@@ -31,7 +31,7 @@ describe API::Lint do
it "responds with errors about invalid configuration" do
post api('/ci/lint'), params: { content: '{ image: "ruby:2.1", services: ["postgres"] }' }
- expect(response).to have_gitlab_http_status(200)
+ expect(response).to have_gitlab_http_status(:ok)
expect(json_response['status']).to eq('invalid')
expect(json_response['errors']).to eq(['jobs config should contain at least one visible job'])
end
@@ -41,7 +41,7 @@ describe API::Lint do
it 'responds with validation error about missing content' do
post api('/ci/lint')
- expect(response).to have_gitlab_http_status(400)
+ expect(response).to have_gitlab_http_status(:bad_request)
expect(json_response['error']).to eq('content is missing')
end
end