demarches-normaliennes/spec/factories/dossier.rb

15 lines
373 B
Ruby
Raw Normal View History

FactoryGirl.define do
factory :dossier do
2015-08-14 14:05:09 +02:00
formulaire_id 12
trait :with_entreprise do
2015-08-20 16:25:54 +02:00
after(:build) do |dossier, _evaluator|
etablissement = create(:etablissement)
entreprise = create(:entreprise, etablissement: etablissement)
dossier.entreprise = entreprise
dossier.etablissement = etablissement
end
end
end
2015-08-20 17:30:17 +02:00
end