Add system spec for managing everyone user role 2FA (#38911)

This commit is contained in:
Matt Jankowski authored and GitHub committed 2026-05-06 08:36:42 +00:00
1 parent cb2e770584
commit aee0025ca3
1 file changed
+14
+14
View File
@@ -74,5 +74,19 @@ RSpec.describe 'Admin::Roles' do
expect(page)
.to have_title(I18n.t('admin.roles.title'))
end
it 'Manages the `everyone` user role' do
role = UserRole.everyone
visit edit_admin_role_path(role)
expect(page)
.to have_title(I18n.t('admin.roles.edit', name: I18n.t('admin.roles.everyone')))
.and have_text('This is the base role affecting all users')
# Update role attribute
check 'user_role_require_2fa' # Require 2FA for everyone
expect { click_on submit_button }
.to(change { role.reload.require_2fa }.to(true))
end
end
end