0
0
Fork 0

Remove final remaining assigns usage in controller specs (#33866)

This commit is contained in:
Matt Jankowski 2025-02-10 02:33:36 -05:00 committed by GitHub
parent 1cf30717db
commit 8c240ef042
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 26 additions and 21 deletions

View file

@ -59,16 +59,15 @@ RSpec.describe Admin::AccountsController do
let(:account) { Fabricate(:account) }
it 'includes moderation notes' do
note1 = Fabricate(:account_moderation_note, target_account: account)
note2 = Fabricate(:account_moderation_note, target_account: account)
note1 = Fabricate(:account_moderation_note, target_account: account, content: 'Note 1 remarks')
note2 = Fabricate(:account_moderation_note, target_account: account, content: 'Note 2 remarks')
get :show, params: { id: account.id }
expect(response).to have_http_status(200)
moderation_notes = assigns(:moderation_notes).to_a
expect(moderation_notes.size).to be 2
expect(moderation_notes).to eq [note1, note2]
expect(response.body)
.to include(note1.content)
.and include(note2.content)
end
end