diff options
author | Jacopo <beschi.jacopo@gmail.com> | 2017-10-19 21:28:19 +0300 |
---|---|---|
committer | Jacopo <beschi.jacopo@gmail.com> | 2017-10-20 11:13:18 +0300 |
commit | 2f40dac35280f9de9af8c47bdf85c2f0b2d53680 (patch) | |
tree | ece7f87f18b32c8961e784973caf1dd299e877c7 /spec/requests/api/wikis_spec.rb | |
parent | b4dc0ba2c57c150f847d255b0d2d831ff60728ad (diff) |
Refactor `have_http_status` into `have_gitlab_http_status` in the specs
Diffstat (limited to 'spec/requests/api/wikis_spec.rb')
-rw-r--r-- | spec/requests/api/wikis_spec.rb | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/spec/requests/api/wikis_spec.rb b/spec/requests/api/wikis_spec.rb index 9e889d1eecf..65bd001e491 100644 --- a/spec/requests/api/wikis_spec.rb +++ b/spec/requests/api/wikis_spec.rb @@ -26,7 +26,7 @@ describe API::Wikis do it 'returns the list of wiki pages without content' do get api(url, user) - expect(response).to have_http_status(200) + expect(response).to have_gitlab_http_status(200) expect(json_response.size).to eq(2) json_response.each_with_index do |page, index| @@ -39,7 +39,7 @@ describe API::Wikis do it 'returns the list of wiki pages with content' do get api(url, user), with_content: 1 - expect(response).to have_http_status(200) + expect(response).to have_gitlab_http_status(200) expect(json_response.size).to eq(2) json_response.each_with_index do |page, index| @@ -54,14 +54,14 @@ describe API::Wikis do it 'return the empty list of wiki pages' do get api(url, user) - expect(response).to have_http_status(200) + expect(response).to have_gitlab_http_status(200) expect(json_response.size).to eq(0) end end shared_examples_for 'returns wiki page' do it 'returns the wiki page' do - expect(response).to have_http_status(200) + expect(response).to have_gitlab_http_status(200) expect(json_response.size).to eq(4) expect(json_response.keys).to match_array(expected_keys_with_content) expect(json_response['content']).to eq(page.content) @@ -74,7 +74,7 @@ describe API::Wikis do it 'creates the wiki page' do post(api(url, user), payload) - expect(response).to have_http_status(201) + expect(response).to have_gitlab_http_status(201) expect(json_response.size).to eq(4) expect(json_response.keys).to match_array(expected_keys_with_content) expect(json_response['content']).to eq(payload[:content]) @@ -89,7 +89,7 @@ describe API::Wikis do post(api(url, user), payload) - expect(response).to have_http_status(400) + expect(response).to have_gitlab_http_status(400) expect(json_response.size).to eq(1) expect(json_response['error']).to eq("#{part} is missing") end @@ -98,7 +98,7 @@ describe API::Wikis do shared_examples_for 'updates wiki page' do it 'updates the wiki page' do - expect(response).to have_http_status(200) + expect(response).to have_gitlab_http_status(200) expect(json_response.size).to eq(4) expect(json_response.keys).to match_array(expected_keys_with_content) expect(json_response['content']).to eq(payload[:content]) @@ -109,7 +109,7 @@ describe API::Wikis do shared_examples_for '403 Forbidden' do it 'returns 403 Forbidden' do - expect(response).to have_http_status(403) + expect(response).to have_gitlab_http_status(403) expect(json_response.size).to eq(1) expect(json_response['message']).to eq('403 Forbidden') end @@ -117,7 +117,7 @@ describe API::Wikis do shared_examples_for '404 Wiki Page Not Found' do it 'returns 404 Wiki Page Not Found' do - expect(response).to have_http_status(404) + expect(response).to have_gitlab_http_status(404) expect(json_response.size).to eq(1) expect(json_response['message']).to eq('404 Wiki Page Not Found') end @@ -125,7 +125,7 @@ describe API::Wikis do shared_examples_for '404 Project Not Found' do it 'returns 404 Project Not Found' do - expect(response).to have_http_status(404) + expect(response).to have_gitlab_http_status(404) expect(json_response.size).to eq(1) expect(json_response['message']).to eq('404 Project Not Found') end @@ -133,7 +133,7 @@ describe API::Wikis do shared_examples_for '204 No Content' do it 'returns 204 No Content' do - expect(response).to have_http_status(204) + expect(response).to have_gitlab_http_status(204) end end |