demarches-normaliennes/spec/factories/dossier.rb

14 lines
371 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
after(:build) do |dossier, evaluator|
etablissement = create(:etablissement)
entreprise = create(:entreprise, etablissement: etablissement)
dossier.entreprise = entreprise
dossier.etablissement = etablissement
end
end
end
end