demarches-normaliennes/spec/factories/export.rb

12 lines
334 B
Ruby
Raw Normal View History

2019-12-03 18:36:50 +01:00
FactoryBot.define do
factory :export do
format { :csv }
2021-06-16 11:46:25 +02:00
time_span_type { Export.time_span_types.fetch(:everything) }
groupe_instructeurs { [association(:groupe_instructeur)] }
after(:build) do |export, _evaluator|
export.key = Export.generate_cache_key(export.groupe_instructeurs.map(&:id))
end
2019-12-03 18:36:50 +01:00
end
end