2018-05-29 12:16:22 +02:00
|
|
|
# Preview all emails at http://localhost:3000/rails/mailers/dossier_mailer
|
|
|
|
class DossierMailerPreview < ActionMailer::Preview
|
2018-11-20 11:50:25 +01:00
|
|
|
def notify_new_draft
|
2018-12-20 16:49:56 +01:00
|
|
|
DossierMailer.notify_new_draft(dossier)
|
2018-11-20 11:50:25 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
def notify_new_answer
|
2018-12-20 16:49:56 +01:00
|
|
|
DossierMailer.notify_new_answer(dossier)
|
2018-11-20 11:50:25 +01:00
|
|
|
end
|
|
|
|
|
2018-05-30 11:36:48 +02:00
|
|
|
def notify_deletion_to_user
|
2018-12-20 16:49:56 +01:00
|
|
|
DossierMailer.notify_deletion_to_user(deleted_dossier, "user@ds.fr")
|
2018-05-30 11:36:48 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
def notify_deletion_to_administration
|
2018-12-20 16:49:56 +01:00
|
|
|
DossierMailer.notify_deletion_to_administration(deleted_dossier, "admin@ds.fr")
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def deleted_dossier
|
|
|
|
DeletedDossier.new(dossier_id: 1, procedure: procedure)
|
|
|
|
end
|
|
|
|
|
|
|
|
def dossier
|
|
|
|
Dossier.new(id: 1, procedure: procedure, user: User.new(email: "usager@example.com"))
|
|
|
|
end
|
|
|
|
|
|
|
|
def procedure
|
|
|
|
Procedure.new(libelle: 'Démarche pour des marches')
|
2018-05-29 12:16:22 +02:00
|
|
|
end
|
|
|
|
end
|