models: require belong_to associations on avis

This commit is contained in:
Pierre de La Morinerie 2020-07-20 14:32:22 +00:00
parent aefdd5d2a1
commit 32e55a6d37
3 changed files with 8 additions and 3 deletions

View file

@ -9,6 +9,11 @@ FactoryBot.define do
association :dossier
association :claimant, factory: :instructeur
trait :with_instructeur do
email { nil }
instructeur { association :instructeur, email: generate(:expert_email) }
end
trait :with_answer do
answer { "Mon avis se décompose en deux points :\n- La demande semble pertinente\n- Le demandeur remplit les conditions." }
end