2024-03-02 22:13:09 +01:00
|
|
|
FactoryBot.define do
|
|
|
|
factory :export_template do
|
|
|
|
name { "Mon export" }
|
|
|
|
groupe_instructeur
|
2024-07-23 17:05:16 +02:00
|
|
|
initialize_with { ExportTemplate.default(name:, groupe_instructeur: groupe_instructeur) }
|
2024-05-28 10:06:30 +02:00
|
|
|
|
2024-07-23 17:05:16 +02:00
|
|
|
trait :enabled_pjs do
|
|
|
|
after(:build) do |export_template, _evaluator|
|
|
|
|
export_template.pjs.each { _1.instance_variable_set('@enabled', true) }
|
2024-06-04 10:19:15 +02:00
|
|
|
end
|
|
|
|
end
|
2024-03-02 22:13:09 +01:00
|
|
|
end
|
|
|
|
end
|