mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-11 18:21:04 +08:00
21 lines
500 B
Ruby
21 lines
500 B
Ruby
# frozen_string_literal: true
|
|
|
|
FactoryBot.define do
|
|
factory :protocol do
|
|
name { Faker::Name.unique.name }
|
|
team
|
|
my_module
|
|
trait :in_public_repository do
|
|
my_module { nil }
|
|
protocol_type { :in_repository_public }
|
|
added_by { create :user }
|
|
published_on { Time.now }
|
|
end
|
|
trait :linked_to_repository do
|
|
protocol_type { :linked }
|
|
parent { create :protocol }
|
|
added_by { create :user }
|
|
parent_updated_at { Time.now }
|
|
end
|
|
end
|
|
end
|