mirror of https://github.com/mastodon/mastodon
Check response body instead of assigns in admin accounts controller spec
This commit is contained in:
parent
18be0fbd2f
commit
4a02eab237
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue