2017-05-02 15:37:06 +02:00
|
|
|
# Preview all emails at http://localhost:3000/rails/mailers/avis_mailer
|
|
|
|
class AvisMailerPreview < ActionMailer::Preview
|
2017-06-07 18:18:24 +02:00
|
|
|
def avis_invitation
|
2019-10-16 16:39:19 +02:00
|
|
|
gestionaire = Instructeur.new(id: 1, user: User.new(email: 'jeanmichel.de-chauvigny@exemple.fr'))
|
2018-12-20 16:49:56 +01:00
|
|
|
avis = Avis.new(id: 1, email: 'test@exemple.fr', claimant: gestionaire)
|
2022-05-23 15:09:22 +02:00
|
|
|
targeted_link = TargetedUserLink.build(target_model: avis, user: avis.expert.user, target_context: :avis)
|
2018-12-20 16:49:56 +01:00
|
|
|
avis.dossier = Dossier.new(id: 1)
|
|
|
|
avis.dossier.procedure = Procedure.new(libelle: 'Démarche pour faire des marches')
|
|
|
|
avis.introduction = 'Il faudrait vérifier le certificat de conformité.'
|
2022-05-23 15:09:22 +02:00
|
|
|
AvisMailer.avis_invitation(avis, targeted_link)
|
2017-05-02 15:37:06 +02:00
|
|
|
end
|
|
|
|
end
|