Make more emails previewable
This commit is contained in:
parent
928dba3b55
commit
e1b97b3303
2 changed files with 39 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue