2019-12-03 18:36:50 +01:00
|
|
|
FactoryBot.define do
|
|
|
|
sequence(:groupe_label) { |n| "label_#{n}" }
|
|
|
|
|
|
|
|
factory :groupe_instructeur do
|
|
|
|
label { generate(:groupe_label) }
|
2020-07-20 17:22:44 +02:00
|
|
|
association :procedure
|
2021-11-19 16:14:40 +01:00
|
|
|
|
2023-06-28 11:02:54 +02:00
|
|
|
after(:create) do |groupe_instructeur, _evaluator|
|
|
|
|
groupe_instructeur.procedure.toggle_routing
|
|
|
|
end
|
|
|
|
|
2021-11-19 16:14:40 +01:00
|
|
|
trait :default do
|
|
|
|
label { GroupeInstructeur::DEFAUT_LABEL }
|
|
|
|
end
|
2021-12-09 12:20:22 +01:00
|
|
|
|
|
|
|
trait :with_bulk_message do
|
|
|
|
bulk_messages { [association(:bulk_message, strategy: :build)] }
|
|
|
|
end
|
2019-12-03 18:36:50 +01:00
|
|
|
end
|
|
|
|
end
|