Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZ.J. van de Weg <zegerjan@gitlab.com>2016-06-27 21:10:42 +0300
committerZ.J. van de Weg <zegerjan@gitlab.com>2016-06-27 21:10:42 +0300
commitabca19da8b0ec12548140f8e771cfc08968d6972 (patch)
tree1db15dba43c2f51a423b8f71a1dbb87e5ea332e2 /spec/requests/api/templates_spec.rb
parente0e325625eb141445720999d4e4a4d60a4b59d95 (diff)
Use HTTP matchers if possible
Diffstat (limited to 'spec/requests/api/templates_spec.rb')
-rw-r--r--spec/requests/api/templates_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/requests/api/templates_spec.rb b/spec/requests/api/templates_spec.rb
index a6d5ade3013..68d0f41b489 100644
--- a/spec/requests/api/templates_spec.rb
+++ b/spec/requests/api/templates_spec.rb
@@ -22,7 +22,7 @@ describe API::Templates, api: true do
it 'returns a list of available gitignore templates' do
get api('/gitignores')
- expect(response.status).to eq(200)
+ expect(response).to have_http_status(200)
expect(json_response).to be_an Array
expect(json_response.size).to be > 15
end
@@ -34,7 +34,7 @@ describe API::Templates, api: true do
it 'returns a list of available gitlab_ci_ymls' do
get api('/gitlab_ci_ymls')
- expect(response.status).to eq(200)
+ expect(response).to have_http_status(200)
expect(json_response).to be_an Array
expect(json_response.first['name']).not_to be_nil
end
@@ -45,7 +45,7 @@ describe API::Templates, api: true do
it 'adds a disclaimer on the top' do
get api('/gitlab_ci_ymls/Ruby')
- expect(response.status).to eq(200)
+ expect(response).to have_http_status(200)
expect(json_response['content']).to start_with("# This file is a template,")
end
end