mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-15 05:34:53 +08:00
857bda6f69
- Models tests - Controllers tests - Jobs tests - Permissions tests - Utilities tests
27 lines
778 B
Ruby
27 lines
778 B
Ruby
FactoryBot.define do
|
|
factory :user_role do
|
|
factory :owner_role do
|
|
name { I18n.t('user_roles.predefined.owner') }
|
|
permissions { PredefinedRoles::OWNER_PERMISSIONS }
|
|
predefined { true }
|
|
end
|
|
|
|
factory :normal_user_role do
|
|
name { I18n.t('user_roles.predefined.normal_user') }
|
|
permissions { PredefinedRoles::NORMAL_USER_PERMISSIONS }
|
|
predefined { true }
|
|
end
|
|
|
|
factory :technician_role do
|
|
name { I18n.t('user_roles.predefined.technician') }
|
|
permissions { PredefinedRoles::TECHNICIAN_PERMISSIONS }
|
|
predefined { true }
|
|
end
|
|
|
|
factory :viewer_role do
|
|
name { I18n.t('user_roles.predefined.viewer') }
|
|
permissions { PredefinedRoles::VIEWER_PERMISSIONS }
|
|
predefined { true }
|
|
end
|
|
end
|
|
end
|