2
0

Fix some routes for numeric AP identifiers (#36304)

This commit is contained in:
Claire
2025-09-30 17:09:59 +02:00
committed by GitHub
parent 473bd84c24
commit 5af40ff960
3 changed files with 34 additions and 4 deletions

View File

@@ -360,6 +360,30 @@ RSpec.describe 'Statuses' do
.to include(content: include(status.text))
end
end
context 'with JSON and querying the new paths' do
subject do
get ap_account_status_path(account_id: status.account_id, id: status.id),
headers: { 'Accept' => 'application/activity+json' },
sign_with: remote_account
end
let(:format) { 'json' }
it 'renders ActivityPub Note object successfully', :aggregate_failures do
subject
expect(response)
.to have_http_status(200)
.and have_cacheable_headers.with_vary('Accept, Accept-Language, Cookie')
expect(response.headers).to include(
'Content-Type' => include('application/activity+json'),
'Link' => include('activity+json')
)
expect(response.parsed_body)
.to include(content: include(status.text))
end
end
end
context 'when status has private visibility' do