factories: flesh out the default etablissement for a dossier

This commit is contained in:
Pierre de La Morinerie 2020-07-06 11:41:18 +02:00
parent a78c0441d6
commit 060bf1f9ca
3 changed files with 7 additions and 2 deletions

View file

@ -28,7 +28,7 @@ FactoryBot.define do
if dossier.procedure.for_individual?
raise 'Inconsistent factory: attempting to create a dossier :with_entreprise on a procedure that is `for_individual?`'
end
etablissement = create(:etablissement)
etablissement = create(:etablissement, :with_exercices, :with_effectif_mensuel)
dossier.etablissement = etablissement
end
end

View file

@ -30,6 +30,12 @@ FactoryBot.define do
end
end
trait :with_effectif_mensuel do
entreprise_effectif_mensuel { 100.5 }
entreprise_effectif_mois { '03' }
entreprise_effectif_annee { '2020' }
end
trait :non_diffusable do
diffusable_commercialement { false }
end