mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-16 06:06:56 +08:00
22 lines
435 B
Ruby
22 lines
435 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
FactoryBot.define do
|
||
|
factory :user_project do
|
||
|
user
|
||
|
project
|
||
|
assigned_by { user }
|
||
|
trait :owner do
|
||
|
role { UserProject.roles[:owner] }
|
||
|
end
|
||
|
trait :normal_user do
|
||
|
role { UserProject.roles[:normal_user] }
|
||
|
end
|
||
|
trait :technician do
|
||
|
role { UserProject.roles[:technician] }
|
||
|
end
|
||
|
trait :viewer do
|
||
|
role { UserProject.roles[:viewer] }
|
||
|
end
|
||
|
end
|
||
|
end
|