demarches-normaliennes/spec/mailers/previews/user_mailer_preview.rb

50 lines
1.3 KiB
Ruby
Raw Normal View History

class UserMailerPreview < ActionMailer::Preview
def new_account_warning
UserMailer.new_account_warning(user)
end
def new_account_warning___with_procedure
procedure = Procedure.new(libelle: 'Dotation dÉquipement des Territoires Ruraux - Exercice 2019', path: 'dotation-etr')
UserMailer.new_account_warning(user, procedure)
end
2021-10-26 13:36:14 +02:00
def ask_for_merge
UserMailer.ask_for_merge(user, 'dircab@territoires.gouv.fr')
end
def france_connect_merge_confirmation
UserMailer.france_connect_merge_confirmation('new.exemple.fr', '123456', 15.minutes.from_now)
end
def send_archive
UserMailer.send_archive(Instructeur.first, Procedure.first, Archive.first)
end
2022-10-06 15:25:30 +02:00
def invite_instructeur
UserMailer.invite_instructeur(user, 'aedfa0d0')
end
2024-07-10 10:57:26 +02:00
def invite_tiers
2024-07-11 17:50:02 +02:00
UserMailer.invite_tiers(user, 'aedfa0d0', Dossier.first)
2024-07-10 10:57:26 +02:00
end
def invite_gestionnaire
groupe_gestionnaire = GroupeGestionnaire.new(name: 'Root admins group')
UserMailer.invite_gestionnaire(user, 'aedfa0d0', groupe_gestionnaire)
2023-08-25 22:53:30 +02:00
end
def notify_inactive_close_to_deletion
UserMailer.notify_inactive_close_to_deletion(user)
end
def notify_after_closing
UserMailer.notify_after_closing(user, "Cette démarche est close")
end
private
def user
User.new(id: 10, email: 'test@exemple.fr')
end
end