2018-01-23 17:15:42 +01:00
|
|
|
FactoryBot.define do
|
2019-10-21 11:45:03 +02:00
|
|
|
sequence(:expert_email) { |n| "expert#{n}@expert.com" }
|
|
|
|
|
2017-04-27 12:17:50 +02:00
|
|
|
factory :avis do
|
2019-10-21 11:45:03 +02:00
|
|
|
email { generate(:expert_email) }
|
2018-09-04 16:46:48 +02:00
|
|
|
introduction { 'Bonjour, merci de me donner votre avis sur ce dossier' }
|
2019-10-21 11:45:03 +02:00
|
|
|
confidentiel { false }
|
2017-04-27 12:17:50 +02:00
|
|
|
|
2019-10-21 11:45:03 +02:00
|
|
|
association :dossier
|
|
|
|
association :claimant, factory: :instructeur
|
2019-04-04 10:13:24 +02:00
|
|
|
|
|
|
|
trait :with_answer do
|
2019-10-21 11:45:03 +02:00
|
|
|
answer { "Mon avis se décompose en deux points :\n- La demande semble pertinente\n- Le demandeur remplit les conditions." }
|
2019-04-04 10:13:24 +02:00
|
|
|
end
|
2017-04-27 12:17:50 +02:00
|
|
|
end
|
|
|
|
end
|