0
0

Reduce RSpec/MultipleExpectations in instance_actors_controller spec (#29229)

This commit is contained in:
Matt Jankowski 2024-02-16 08:00:11 -05:00 committed by GitHub
parent bba488c189
commit 1690fb39e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -13,17 +13,19 @@ RSpec.describe InstanceActorsController do
end
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.cookies).to be_empty
expect(response.headers['Set-Cookies']).to be_nil
expect(response.headers)
.to include('Cache-Control' => include('public'))
.and not_include('Set-Cookies')
expect(session).to be_empty
expect(response.headers['Cache-Control']).to include 'public'
expect(body_as_json)
.to include(:id, :type, :preferredUsername, :inbox, :publicKey, :inbox, :outbox, :url)
end