Combine API request spec assertions (#31970)

This commit is contained in:
Matt Jankowski 2024-09-19 06:15:21 -04:00 committed by GitHub
parent 1fce55cf5d
commit b071e618e7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 36 additions and 232 deletions

View file

@ -193,15 +193,11 @@ RSpec.describe 'Accounts' do
it_behaves_like 'forbidden for wrong scope', 'write write:accounts read admin:read'
it_behaves_like 'forbidden for wrong role', ''
it 'removes the user successfully', :aggregate_failures do
it 'removes the user successfully and logs action', :aggregate_failures do
subject
expect(response).to have_http_status(200)
expect(User.where(id: account.user.id)).to_not exist
end
it 'logs action', :aggregate_failures do
subject
expect(latest_admin_action_log)
.to be_present