0
0
Fork 0

Reduce extra round trips in activitypub controller specs (#31041)

This commit is contained in:
Matt Jankowski 2024-07-17 04:09:34 -04:00 committed by GitHub
parent f5e90f3de3
commit 76c2c5c748
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 56 additions and 126 deletions

View file

@ -66,19 +66,15 @@ RSpec.describe ActivityPub::RepliesController do
context 'when status is public' do
let(:parent_visibility) { :public }
let(:json) { body_as_json }
let(:page_json) { json[:first] }
it 'returns http success' do
expect(response).to have_http_status(200)
end
it 'returns application/activity+json' do
expect(response.media_type).to eq 'application/activity+json'
end
let(:page_json) { body_as_json[:first] }
it_behaves_like 'cacheable response'
it 'returns http success and correct media type' do
expect(response).to have_http_status(200)
expect(response.media_type).to eq 'application/activity+json'
end
context 'without only_other_accounts' do
it "returns items with thread author's replies" do
expect(page_json).to be_a Hash