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/events_spec.rb | |
parent | b4dc0ba2c57c150f847d255b0d2d831ff60728ad (diff) |
Refactor `have_http_status` into `have_gitlab_http_status` in the specs
Diffstat (limited to 'spec/requests/api/events_spec.rb')
-rw-r--r-- | spec/requests/api/events_spec.rb | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/spec/requests/api/events_spec.rb b/spec/requests/api/events_spec.rb index a23d28994ce..962c845f36d 100644 --- a/spec/requests/api/events_spec.rb +++ b/spec/requests/api/events_spec.rb @@ -14,7 +14,7 @@ describe API::Events do it 'returns authentication error' do get api('/events') - expect(response).to have_http_status(401) + expect(response).to have_gitlab_http_status(401) end end @@ -22,7 +22,7 @@ describe API::Events do it 'returns users events' do get api('/events?action=closed&target_type=issue&after=2016-12-1&before=2016-12-31', user) - expect(response).to have_http_status(200) + expect(response).to have_gitlab_http_status(200) expect(response).to include_pagination_headers expect(json_response).to be_an Array expect(json_response.size).to eq(1) @@ -35,7 +35,7 @@ describe API::Events do it 'returns no events' do get api("/users/#{user.id}/events", other_user) - expect(response).to have_http_status(200) + expect(response).to have_gitlab_http_status(200) expect(json_response).to be_empty end end @@ -44,7 +44,7 @@ describe API::Events do it 'accepts a username' do get api("/users/#{user.username}/events", user) - expect(response).to have_http_status(200) + expect(response).to have_gitlab_http_status(200) expect(response).to include_pagination_headers expect(json_response).to be_an Array expect(json_response.size).to eq(1) @@ -53,7 +53,7 @@ describe API::Events do it 'returns the events' do get api("/users/#{user.id}/events", user) - expect(response).to have_http_status(200) + expect(response).to have_gitlab_http_status(200) expect(response).to include_pagination_headers expect(json_response).to be_an Array expect(json_response.size).to eq(1) @@ -72,7 +72,7 @@ describe API::Events do end it 'responds with HTTP 200 OK' do - expect(response).to have_http_status(200) + expect(response).to have_gitlab_http_status(200) end it 'includes the push payload as a Hash' do @@ -120,7 +120,7 @@ describe API::Events do it 'returns a 404 error if not found' do get api('/users/42/events', user) - expect(response).to have_http_status(404) + expect(response).to have_gitlab_http_status(404) expect(json_response['message']).to eq('404 User Not Found') end end @@ -130,7 +130,7 @@ describe API::Events do it 'returns 404 for private project' do get api("/projects/#{private_project.id}/events") - expect(response).to have_http_status(404) + expect(response).to have_gitlab_http_status(404) end it 'returns 200 status for a public project' do @@ -138,7 +138,7 @@ describe API::Events do get api("/projects/#{public_project.id}/events") - expect(response).to have_http_status(200) + expect(response).to have_gitlab_http_status(200) end end @@ -146,7 +146,7 @@ describe API::Events do it 'returns 404' do get api("/projects/#{private_project.id}/events", non_member) - expect(response).to have_http_status(404) + expect(response).to have_gitlab_http_status(404) end end @@ -154,7 +154,7 @@ describe API::Events do it 'returns project events' do get api("/projects/#{private_project.id}/events?action=closed&target_type=issue&after=2016-12-1&before=2016-12-31", user) - expect(response).to have_http_status(200) + expect(response).to have_gitlab_http_status(200) expect(response).to include_pagination_headers expect(json_response).to be_an Array expect(json_response.size).to eq(1) @@ -163,7 +163,7 @@ describe API::Events do it 'returns 404 if project does not exist' do get api("/projects/1234/events", user) - expect(response).to have_http_status(404) + expect(response).to have_gitlab_http_status(404) end end |