Reduce extra round trips in activitypub
controller specs (#31041)
This commit is contained in:
parent
f5e90f3de3
commit
76c2c5c748
4 changed files with 56 additions and 126 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue