Change the quote revocation REST API endpoint to return updated quote post (#35677)

pull/35683/head
Claire 3 months ago committed by GitHub
parent 9c0a10f662
commit 1fd3510b32
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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

Loading…
Cancel
Save