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:
parent
32cb060652
commit
71918091e6
2 changed files with 2 additions and 19 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue