mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-16 22:25:30 +08:00
25 lines
692 B
Ruby
25 lines
692 B
Ruby
# frozen_string_literal: true
|
|
|
|
FactoryBot.define do
|
|
factory :my_module_status do
|
|
name { Faker::Name.unique.name }
|
|
description { Faker::Lorem.sentence }
|
|
color { Faker::Color.hex_color }
|
|
my_module_status_flow
|
|
trait :with_consequence do
|
|
after(:create) do |status|
|
|
create :my_module_status_consequence, my_module_status: status
|
|
end
|
|
end
|
|
trait :with_conditions do
|
|
after(:create) do |status|
|
|
create :my_module_status_condition, my_module_status: status
|
|
end
|
|
end
|
|
trait :with_implications do
|
|
after(:create) do |status|
|
|
create :my_module_status_implication, my_module_status: status
|
|
end
|
|
end
|
|
end
|
|
end
|