diff --git a/spec/controllers/admin/accounts_controller_spec.rb b/spec/controllers/admin/accounts_controller_spec.rb index f241d261b1b..bbd528a0a39 100644 --- a/spec/controllers/admin/accounts_controller_spec.rb +++ b/spec/controllers/admin/accounts_controller_spec.rb @@ -215,13 +215,8 @@ RSpec.describe Admin::AccountsController do it 'succeeds in rejecting account and logs action' do expect(subject).to redirect_to admin_accounts_path(status: 'pending') - expect(latest_admin_action_log) - .to be_present - .and have_attributes( - action: eq(:reject), - account_id: eq(current_user.account_id), - target_id: eq(account.user.id) - ) + expect { account.reload } + .to raise_error(ActiveRecord::RecordNotFound) end end diff --git a/spec/requests/api/v1/admin/accounts_spec.rb b/spec/requests/api/v1/admin/accounts_spec.rb index 1615581f0ea..0e7bd0dba13 100644 --- a/spec/requests/api/v1/admin/accounts_spec.rb +++ b/spec/requests/api/v1/admin/accounts_spec.rb @@ -199,18 +199,6 @@ RSpec.describe 'Accounts' do 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 - .and have_attributes( - action: eq(:reject), - account_id: eq(user.account_id), - target_id: eq(account.user.id) - ) - end end context 'when account is already approved' do