2017-04-27 12:17:50 +02:00
|
|
|
FactoryGirl.define do
|
|
|
|
factory :avis do
|
|
|
|
introduction 'Bonjour, merci de me donner votre avis sur ce dossier'
|
|
|
|
|
|
|
|
before(:create) do |avis, _evaluator|
|
2018-01-11 19:04:39 +01:00
|
|
|
if !avis.gestionnaire
|
2017-04-27 12:17:50 +02:00
|
|
|
avis.gestionnaire = create :gestionnaire
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
before(:create) do |avis, _evaluator|
|
2018-01-11 19:04:39 +01:00
|
|
|
if !avis.dossier
|
2017-04-27 12:17:50 +02:00
|
|
|
avis.dossier = create :dossier
|
|
|
|
end
|
|
|
|
end
|
2017-05-23 13:28:17 +02:00
|
|
|
|
|
|
|
before(:create) do |avis, _evaluator|
|
2018-01-11 19:04:39 +01:00
|
|
|
if !avis.claimant
|
2017-05-23 13:28:17 +02:00
|
|
|
avis.claimant = create :gestionnaire
|
|
|
|
end
|
|
|
|
end
|
2017-04-27 12:17:50 +02:00
|
|
|
end
|
|
|
|
end
|