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

This commit is contained in:
Claire authored and GitHub committed 2025-07-03 14:42:48 +00:00
1 parent c66c5fd73d
commit e97f43399b
3 files changed
+27 -10

No files matched your search

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