Reduce RSpec/MultipleExpectations
in instance_actors_controller spec (#29229)
This commit is contained in:
parent
bba488c189
commit
1690fb39e6
1 changed files with 9 additions and 7 deletions
|
@ -13,17 +13,19 @@ RSpec.describe InstanceActorsController do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'returns http success with correct media type, headers, and session values' do
|
it 'returns http success with correct media type, headers, and session values' do
|
||||||
expect(response).to have_http_status(200)
|
expect(response)
|
||||||
|
.to have_http_status(200)
|
||||||
|
.and have_attributes(
|
||||||
|
media_type: eq('application/activity+json'),
|
||||||
|
cookies: be_empty
|
||||||
|
)
|
||||||
|
|
||||||
expect(response.media_type).to eq 'application/activity+json'
|
expect(response.headers)
|
||||||
|
.to include('Cache-Control' => include('public'))
|
||||||
expect(response.cookies).to be_empty
|
.and not_include('Set-Cookies')
|
||||||
expect(response.headers['Set-Cookies']).to be_nil
|
|
||||||
|
|
||||||
expect(session).to be_empty
|
expect(session).to be_empty
|
||||||
|
|
||||||
expect(response.headers['Cache-Control']).to include 'public'
|
|
||||||
|
|
||||||
expect(body_as_json)
|
expect(body_as_json)
|
||||||
.to include(:id, :type, :preferredUsername, :inbox, :publicKey, :inbox, :outbox, :url)
|
.to include(:id, :type, :preferredUsername, :inbox, :publicKey, :inbox, :outbox, :url)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue