0
0
Fork 0

Remove usage of assigns in controller specs (#30195)

This commit is contained in:
Matt Jankowski 2024-09-03 11:23:16 -04:00 committed by GitHub
parent ae363f0555
commit 5b595b8a5a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 66 additions and 51 deletions

View file

@ -40,15 +40,16 @@ RSpec.describe Admin::AccountsController do
expect(response)
.to have_http_status(200)
expect(assigns(:accounts))
.to have_attributes(
count: eq(1),
klass: be(Account)
)
expect(accounts_table_rows.size)
.to eq(1)
expect(AccountFilter)
.to have_received(:new)
.with(hash_including(params))
end
def accounts_table_rows
Nokogiri::Slop(response.body).css('table.accounts-table tr')
end
end
describe 'GET #show' do