1
0
Fork 0
mirror of https://github.com/mastodon/mastodon.git synced 2024-08-20 21:08:15 -07:00

Check response body instead of assigns in admin accounts controller spec

This commit is contained in:
Matt Jankowski 2024-04-30 13:10:25 -04:00
parent 80f43f6bb8
commit a9ee0af17b

View file

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