2015-08-13 15:55:19 +02:00
|
|
|
FactoryGirl.define do
|
|
|
|
factory :dossier do
|
2015-08-14 14:05:09 +02:00
|
|
|
formulaire_id 12
|
2015-08-13 15:55:19 +02:00
|
|
|
|
|
|
|
trait :with_entreprise do
|
|
|
|
after(:build) do |dossier, evaluator|
|
|
|
|
etablissement = create(:etablissement)
|
|
|
|
entreprise = create(:entreprise, etablissement: etablissement)
|
|
|
|
dossier.entreprise = entreprise
|
|
|
|
dossier.etablissement = etablissement
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|