add expert mailer preview

This commit is contained in:
kara Diaby 2021-04-12 10:19:49 +02:00
parent 663fa50f02
commit f4aa29a799

View file

@ -0,0 +1,11 @@
class AvisMailerPreview < ActionMailer::Preview
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