diff --git a/spec/system/admin/roles_spec.rb b/spec/system/admin/roles_spec.rb index 8765bc9967..36a72d1f3c 100644 --- a/spec/system/admin/roles_spec.rb +++ b/spec/system/admin/roles_spec.rb @@ -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