Make more emails previewable

This commit is contained in:
maatinito 2018-12-20 16:46:44 +01:00 committed by gregoirenovel
parent 928dba3b55
commit e1b97b3303
2 changed files with 39 additions and 0 deletions

View file

@ -14,4 +14,29 @@ class AdministrationMailerPreview < ActionMailer::Preview
def refuse_admin
AdministrationMailer.refuse_admin('bad_admin@pipo.com')
end
def new_admin
administration = Administration.new(email: 'superadmin@demarches-simplifiees.fr')
AdministrationMailer.new_admin_email(administrateur, administration)
end
def dossier_expiration_summary
expiring_dossiers = [Dossier.new(id: 100, procedure: procedure_1)]
expired_dossiers = [Dossier.new(id: 100, procedure: procedure_2)]
AdministrationMailer.dossier_expiration_summary(expiring_dossiers, expired_dossiers)
end
private
def procedure_1
Procedure.new(id: 10, libelle: "Démarche des marches", administrateur: administrateur)
end
def procedure_2
Procedure.new(id: 20, libelle: "Démarche pieds", administrateur: administrateur)
end
def administrateur
Administrateur.new(id: 111, email: "chef.de.service@administration.gouv.fr")
end
end

View file

@ -11,4 +11,18 @@ class GestionnaireMailerPreview < ActionMailer::Preview
def send_login_token
GestionnaireMailer.send_login_token(Gestionnaire.first, "token")
end
def invite_gestionnaire
GestionnaireMailer.invite_gestionnaire(gestionnaire, 'aedfa0d0')
end
def user_to_gestionnaire
GestionnaireMailer.user_to_gestionnaire(gestionnaire.email)
end
private
def gestionnaire
Gestionnaire.new(id: 10, email: 'instructeur@administration.gouv.fr')
end
end