diff options
Diffstat (limited to 'spec/support/shared_examples/resource_label_events_api.rb')
-rw-r--r-- | spec/support/shared_examples/resource_label_events_api.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/support/shared_examples/resource_label_events_api.rb b/spec/support/shared_examples/resource_label_events_api.rb index 6622df78ee2..d3d9b83764d 100644 --- a/spec/support/shared_examples/resource_label_events_api.rb +++ b/spec/support/shared_examples/resource_label_events_api.rb @@ -8,7 +8,7 @@ shared_examples 'resource_label_events API' do |parent_type, eventable_type, id_ it "returns an array of resource label events" do get api("/#{parent_type}/#{parent.id}/#{eventable_type}/#{eventable[id_name]}/resource_label_events", user) - expect(response).to have_gitlab_http_status(200) + expect(response).to have_gitlab_http_status(:ok) expect(response).to include_pagination_headers expect(json_response).to be_an Array expect(json_response.first['id']).to eq(event.id) @@ -17,7 +17,7 @@ shared_examples 'resource_label_events API' do |parent_type, eventable_type, id_ it "returns a 404 error when eventable id not found" do get api("/#{parent_type}/#{parent.id}/#{eventable_type}/12345/resource_label_events", user) - expect(response).to have_gitlab_http_status(404) + expect(response).to have_gitlab_http_status(:not_found) end it "returns 404 when not authorized" do @@ -26,7 +26,7 @@ shared_examples 'resource_label_events API' do |parent_type, eventable_type, id_ get api("/#{parent_type}/#{parent.id}/#{eventable_type}/#{eventable[id_name]}/resource_label_events", private_user) - expect(response).to have_gitlab_http_status(404) + expect(response).to have_gitlab_http_status(:not_found) end end @@ -60,7 +60,7 @@ shared_examples 'resource_label_events API' do |parent_type, eventable_type, id_ it "returns a resource label event by id" do get api("/#{parent_type}/#{parent.id}/#{eventable_type}/#{eventable[id_name]}/resource_label_events/#{event.id}", user) - expect(response).to have_gitlab_http_status(200) + expect(response).to have_gitlab_http_status(:ok) expect(json_response['id']).to eq(event.id) end @@ -70,13 +70,13 @@ shared_examples 'resource_label_events API' do |parent_type, eventable_type, id_ get api("/#{parent_type}/#{parent.id}/#{eventable_type}/#{eventable[id_name]}/resource_label_events/#{event.id}", private_user) - expect(response).to have_gitlab_http_status(404) + expect(response).to have_gitlab_http_status(:not_found) end it "returns a 404 error if resource label event not found" do get api("/#{parent_type}/#{parent.id}/#{eventable_type}/#{eventable[id_name]}/resource_label_events/12345", user) - expect(response).to have_gitlab_http_status(404) + expect(response).to have_gitlab_http_status(:not_found) end end @@ -88,7 +88,7 @@ shared_examples 'resource_label_events API' do |parent_type, eventable_type, id_ it "returns a 404 error if cross-reference project is not accessible" do get api("/#{parent_type}/#{parent.id}/#{eventable_type}/#{eventable[id_name]}/resource_label_events/#{event.id}", user) - expect(response).to have_gitlab_http_status(404) + expect(response).to have_gitlab_http_status(:not_found) end end end |