Fix some routes for numeric AP identifiers (#36304)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user