|
|
|
@ -133,6 +133,21 @@ RSpec.describe '/api/v1/statuses' do
|
|
|
|
expect(response).to have_http_status(200)
|
|
|
|
expect(response).to have_http_status(200)
|
|
|
|
expect(response.content_type)
|
|
|
|
expect(response.content_type)
|
|
|
|
.to start_with('application/json')
|
|
|
|
.to start_with('application/json')
|
|
|
|
|
|
|
|
expect(response.headers['Mastodon-Async-Refresh']).to be_nil
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
context 'with a remote status' do
|
|
|
|
|
|
|
|
let(:status) { Fabricate(:status, account: Fabricate(:account, domain: 'example.com'), created_at: 1.hour.ago, updated_at: 1.hour.ago) }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it 'returns http success and queues discovery of new posts' do
|
|
|
|
|
|
|
|
expect { get "/api/v1/statuses/#{status.id}/context", headers: headers }
|
|
|
|
|
|
|
|
.to enqueue_sidekiq_job(ActivityPub::FetchAllRepliesWorker)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
expect(response).to have_http_status(200)
|
|
|
|
|
|
|
|
expect(response.content_type)
|
|
|
|
|
|
|
|
.to start_with('application/json')
|
|
|
|
|
|
|
|
expect(response.headers['Mastodon-Async-Refresh']).to match(/result_count=0/)
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|