scinote-web/spec/factories/user_roles.rb
Soufiane 857bda6f69
Fix broken unit tests [SCI-8972] (#6342)
- Models tests
- Controllers tests
- Jobs tests
- Permissions tests
- Utilities tests
2023-10-12 16:16:43 +02:00

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