demarches-normaliennes/spec/mailers/previews/expert_mailer_preview.rb

12 lines
686 B
Ruby
Raw Normal View History

2021-04-15 12:22:40 +02:00
class ExpertMailerPreview < ActionMailer::Preview
2021-04-12 10:19:49 +02:00
def send_dossier_decision
procedure = Procedure.new(libelle: 'Démarche pour faire des marches')
dossier = Dossier.new(id: 1, procedure: procedure)
instructeur = Instructeur.new(id: 1, user: User.new(email: 'jeanmichel.de-chauvigny@exemple.fr'))
expert = Expert.new(id: 1, user: User.new('moussa.kanga@exemple.fr'))
experts_procedure = ExpertsProcedure.new(expert: expert, procedure: procedure, allow_decision_access: true)
avis = Avis.new(id: 1, email: 'test@exemple.fr', dossier: dossier, claimant: instructeur, experts_procedure: experts_procedure)
ExpertMailer.send_dossier_decision(avis.id)
end
end