2
0

Fix error handling for blank actions in account moderation action form (#35246)

This commit is contained in:
Claire
2025-07-03 16:42:48 +02:00
parent 000ff9c05f
commit 42884d8727
3 changed files with 27 additions and 10 deletions

View File

@@ -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)