specs: explicitely pass the dossier to champs factories

Otherwise the factory will not know in avance which procedure this
champs belongs to.
This commit is contained in:
Pierre de La Morinerie 2021-11-16 14:49:32 +01:00
parent ef2d9a3e86
commit d8fbcfe2e2

View file

@ -21,11 +21,11 @@ describe DossierSerializer do
let(:dossier) { create(:dossier, :en_construction, procedure: create(:procedure, :published, :with_type_de_champ)) }
before do
dossier.champs << build(:champ_carte)
dossier.champs << build(:champ_siret)
dossier.champs << build(:champ_integer_number)
dossier.champs << build(:champ_decimal_number)
dossier.champs << build(:champ_linked_drop_down_list)
dossier.champs << build(:champ_carte, dossier: dossier)
dossier.champs << build(:champ_siret, dossier: dossier)
dossier.champs << build(:champ_integer_number, dossier: dossier)
dossier.champs << build(:champ_decimal_number, dossier: dossier)
dossier.champs << build(:champ_linked_drop_down_list, dossier: dossier)
end
it {