From beb74fd71cba1c460c8ef3df016905aa063bdc7f Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Fri, 26 Jan 2024 11:28:50 -0500 Subject: [PATCH] Combine double subjects in instance actors controller shared example (#28939) --- .../instance_actors_controller_spec.rb | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/spec/controllers/instance_actors_controller_spec.rb b/spec/controllers/instance_actors_controller_spec.rb index 8406094311..36b9049fbc 100644 --- a/spec/controllers/instance_actors_controller_spec.rb +++ b/spec/controllers/instance_actors_controller_spec.rb @@ -12,30 +12,20 @@ RSpec.describe InstanceActorsController do get :show, params: { format: format } end - it 'returns http success' do + it 'returns http success with correct media type, headers, and session values' 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 - it 'does not set cookies' do expect(response.cookies).to be_empty expect(response.headers['Set-Cookies']).to be_nil - end - it 'does not set sessions' do expect(session).to be_empty - end - it 'returns public Cache-Control header' do expect(response.headers['Cache-Control']).to include 'public' - end - it 'renders account' do - json = body_as_json - expect(json).to include(:id, :type, :preferredUsername, :inbox, :publicKey, :inbox, :outbox, :url) + expect(body_as_json) + .to include(:id, :type, :preferredUsername, :inbox, :publicKey, :inbox, :outbox, :url) end end