Merge commit 'ffeb5da9912a3b7db0deb8aec429e661ef609c59' into glitch-soc/merge-upstream

This commit is contained in:
Claire committed 2025-08-05 15:46:33 +02:00
commit 3f166bb068
68 files changed
+192 -24

No files matched your search

@@ -226,16 +226,16 @@ RSpec.describe ApplicationController do
it_behaves_like 'error response', 410
end
describe 'unprocessable_entity' do
describe 'unprocessable_content' do
controller do
def route_unprocessable_entity
unprocessable_entity
def route_unprocessable_content
unprocessable_content
end
end
subject do
routes.draw { get 'route_unprocessable_entity' => 'anonymous#route_unprocessable_entity' }
get 'route_unprocessable_entity'
routes.draw { get 'route_unprocessable_content' => 'anonymous#route_unprocessable_content' }
get 'route_unprocessable_content'
end
it_behaves_like 'error response', 422
@@ -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
+1 -1
View File
@@ -98,7 +98,7 @@ RSpec.describe 'Search API' do
context 'when search raises syntax error' do
before { allow(Search).to receive(:new).and_raise(Mastodon::SyntaxError) }
it 'returns http unprocessable_entity' do
it 'returns http unprocessable_content' do
get '/api/v2/search', headers: headers, params: params
expect(response).to have_http_status(422)