2021-12-01 21:38:41 +01:00
|
|
|
FactoryBot.define do
|
|
|
|
factory :zone do
|
|
|
|
sequence(:acronym) { |n| "MA#{n}" }
|
2022-08-11 19:05:12 +02:00
|
|
|
transient do
|
|
|
|
labels { [{ designated_on: '1981-05-08', name: "Ministère de l'Education Populaire" }] }
|
|
|
|
end
|
|
|
|
|
|
|
|
after(:create) do |zone, evaluator|
|
|
|
|
evaluator.labels.each do |label|
|
|
|
|
zone.labels.create(designated_on: label[:designated_on], name: label[:name])
|
|
|
|
end
|
|
|
|
end
|
2021-12-01 21:38:41 +01:00
|
|
|
end
|
|
|
|
end
|