demarches-normaliennes/spec/factories/commentaire.rb
2018-09-04 16:46:48 +02:00

11 lines
221 B
Ruby

FactoryBot.define do
factory :commentaire do
body { 'plop' }
before(:create) do |commentaire, _evaluator|
if !commentaire.dossier
commentaire.dossier = create :dossier
end
end
end
end