dossiers: make build_default_individual
explicit
It avoid the use of callbacks, and may avoid situations where an empty individual is implicitely created.
This commit is contained in:
parent
5e05556ee8
commit
b3558c497d
3 changed files with 12 additions and 8 deletions
|
@ -15,9 +15,12 @@ FactoryBot.define do
|
|||
procedure = create(:procedure, :published, :with_type_de_champ, :with_type_de_champ_private)
|
||||
end
|
||||
|
||||
# Assign the procedure to the dossier through the groupe_instructeur
|
||||
if dossier.groupe_instructeur.nil?
|
||||
dossier.groupe_instructeur = procedure.defaut_groupe_instructeur
|
||||
end
|
||||
|
||||
dossier.build_default_individual
|
||||
end
|
||||
|
||||
trait :with_entreprise do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue