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

Dont expect log when rejecting

This commit is contained in:
Matt Jankowski 2024-05-25 12:46:32 -04:00
parent 32cb060652
commit 71918091e6
2 changed files with 2 additions and 19 deletions

View file

@ -215,13 +215,8 @@ RSpec.describe Admin::AccountsController do
it 'succeeds in rejecting account and logs action' do it 'succeeds in rejecting account and logs action' do
expect(subject).to redirect_to admin_accounts_path(status: 'pending') expect(subject).to redirect_to admin_accounts_path(status: 'pending')
expect(latest_admin_action_log) expect { account.reload }
.to be_present .to raise_error(ActiveRecord::RecordNotFound)
.and have_attributes(
action: eq(:reject),
account_id: eq(current_user.account_id),
target_id: eq(account.user.id)
)
end end
end end

View file

@ -199,18 +199,6 @@ RSpec.describe 'Accounts' do
expect(response).to have_http_status(200) expect(response).to have_http_status(200)
expect(User.where(id: account.user.id)).to_not exist expect(User.where(id: account.user.id)).to_not exist
end 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 end
context 'when account is already approved' do context 'when account is already approved' do