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:
parent
ef2d9a3e86
commit
d8fbcfe2e2
1 changed files with 5 additions and 5 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue