Fix factory to avoid crash because of procedure is nil

This commit is contained in:
Mathieu Magnin 2019-04-11 12:23:40 +02:00
parent e5966fda46
commit 22034730b0

View file

@ -19,7 +19,7 @@ FactoryBot.define do
end
trait :with_service do
after(:build) do |dossier, _evaluator|
after(:create) do |dossier, _evaluator|
dossier.procedure.service = create(:service)
end
end