Change the quote revocation REST API endpoint to return updated quote post (#35677)
This commit is contained in:
@@ -19,7 +19,7 @@ class Api::V1::Statuses::QuotesController < Api::V1::Statuses::BaseController
|
||||
|
||||
RevokeQuoteService.new.call(@quote)
|
||||
|
||||
render_empty # TODO: do we want to return something? an updated status?
|
||||
render json: @quote.status, serializer: REST::StatusSerializer
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
@@ -108,6 +108,12 @@ RSpec.describe 'API V1 Statuses Quotes' do
|
||||
|
||||
expect(response)
|
||||
.to have_http_status(200)
|
||||
expect(response.content_type)
|
||||
.to start_with('application/json')
|
||||
expect(response.parsed_body)
|
||||
.to match(
|
||||
a_hash_including(id: quote.status.id.to_s, quote: a_hash_including(state: 'revoked'))
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user