diff --git a/app/controllers/api/v3/notices_controller.rb b/app/controllers/api/v3/notices_controller.rb index 3362deb..f344eb4 100644 --- a/app/controllers/api/v3/notices_controller.rb +++ b/app/controllers/api/v3/notices_controller.rb @@ -18,7 +18,7 @@ class Api::V3::NoticesController < ApplicationController return render text: VERSION_TOO_OLD, status: 422 unless report.should_keep? report.generate_notice! - render status: 200, json: { + render status: 201, json: { id: report.notice.id, url: report.problem.url } diff --git a/spec/controllers/api/v3/notices_controller_spec.rb b/spec/controllers/api/v3/notices_controller_spec.rb index d96f046..fa3541f 100644 --- a/spec/controllers/api/v3/notices_controller_spec.rb +++ b/spec/controllers/api/v3/notices_controller_spec.rb @@ -21,9 +21,9 @@ describe Api::V3::NoticesController, type: :controller do ) end - it 'responds with 200 created on success' do + it 'responds with 201 created on success' do post :create, legit_body, legit_params - expect(response.status).to be(200) + expect(response.status).to be(201) end it 'responds with 400 when request attributes are not valid' do -- libgit2 0.21.2