Fix error handling for blank actions in account moderation action form (#35246)
This commit is contained in:
parent
000ff9c05f
commit
42884d8727
3 changed files with 27 additions and 10 deletions
|
|
@ -15,6 +15,13 @@ RSpec.describe 'Admin Account Actions' do
|
|||
expect(page)
|
||||
.to have_title(I18n.t('admin.account_actions.title', acct: account.pretty_acct))
|
||||
|
||||
# Invalid submission
|
||||
expect { submit_form }
|
||||
.to_not(change { account.strikes.count })
|
||||
expect(page)
|
||||
.to have_content(/can't be blank/)
|
||||
|
||||
# Valid submission
|
||||
choose(option: 'silence')
|
||||
expect { submit_form }
|
||||
.to change { account.strikes.count }.by(1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue