demarches-normaliennes/spec/factories/commentaire.rb

12 lines
218 B
Ruby
Raw Normal View History

FactoryGirl.define do
factory :commentaire do
body 'plop'
2016-12-26 18:37:27 +01:00
before(:create) do |commentaire, _evaluator|
2018-01-11 19:04:39 +01:00
if !commentaire.dossier
2016-12-26 18:37:27 +01:00
commentaire.dossier = create :dossier
end
end
end
2015-08-20 17:30:17 +02:00
end