Eliminate double subject call in admin/ controller specs (#28158)
This commit is contained in:
parent
8710bdb183
commit
b751078fcd
3 changed files with 16 additions and 16 deletions
|
@ -20,7 +20,7 @@ RSpec.describe Admin::AccountModerationNotesController do
|
|||
|
||||
it 'successfully creates a note' do
|
||||
expect { subject }.to change(AccountModerationNote, :count).by(1)
|
||||
expect(subject).to redirect_to admin_account_path(target_account.id)
|
||||
expect(response).to redirect_to admin_account_path(target_account.id)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -29,7 +29,7 @@ RSpec.describe Admin::AccountModerationNotesController do
|
|||
|
||||
it 'falls to create a note' do
|
||||
expect { subject }.to_not change(AccountModerationNote, :count)
|
||||
expect(subject).to render_template 'admin/accounts/show'
|
||||
expect(response).to render_template 'admin/accounts/show'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -42,7 +42,7 @@ RSpec.describe Admin::AccountModerationNotesController do
|
|||
|
||||
it 'destroys note' do
|
||||
expect { subject }.to change(AccountModerationNote, :count).by(-1)
|
||||
expect(subject).to redirect_to admin_account_path(target_account.id)
|
||||
expect(response).to redirect_to admin_account_path(target_account.id)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue