Add system spec for managing everyone user role 2FA (#38911)
This commit is contained in:
parent
cb2e770584
commit
aee0025ca3
@ -74,5 +74,19 @@ RSpec.describe 'Admin::Roles' do
|
|||||||
expect(page)
|
expect(page)
|
||||||
.to have_title(I18n.t('admin.roles.title'))
|
.to have_title(I18n.t('admin.roles.title'))
|
||||||
end
|
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
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user