specs: fix :champ_siret factory not using the procedure

Unlike all other champs factories, :champ_siret would attempt to build
a champ with a `nil` procedure (instead of using the dossier's one).
This commit is contained in:
Pierre de La Morinerie 2021-11-16 14:48:57 +01:00
parent 774ef00f8e
commit ef2d9a3e86

View file

@ -190,7 +190,7 @@ FactoryBot.define do
end
factory :champ_siret, class: 'Champs::SiretChamp' do
association :type_de_champ, factory: [:type_de_champ_siret]
type_de_champ { association :type_de_champ_siret, procedure: dossier.procedure }
association :etablissement, factory: [:etablissement]
value { '44011762001530' }
end