2024-04-29 00:17:15 +02:00
|
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
2018-05-14 14:21:03 +02:00
|
|
|
|
class DeviseUserMailerPreview < ActionMailer::Preview
|
|
|
|
|
def confirmation_instructions
|
2018-12-20 16:49:56 +01:00
|
|
|
|
DeviseUserMailer.confirmation_instructions(user, "faketoken", {})
|
2018-05-14 14:21:03 +02:00
|
|
|
|
end
|
|
|
|
|
|
2020-02-24 11:55:29 +01:00
|
|
|
|
def confirmation_instructions___with_procedure
|
|
|
|
|
CurrentConfirmation.procedure_after_confirmation = procedure
|
|
|
|
|
DeviseUserMailer.confirmation_instructions(user, "faketoken", {})
|
|
|
|
|
end
|
|
|
|
|
|
2023-01-03 14:46:10 +01:00
|
|
|
|
def confirmation_instructions___with_procedure_and_prefill_token
|
|
|
|
|
DeviseUserMailer.confirmation_instructions(user, "faketoken", procedure_after_confirmation: procedure, prefill_token: "prefill_token")
|
|
|
|
|
end
|
|
|
|
|
|
2018-05-14 14:21:03 +02:00
|
|
|
|
def reset_password_instructions
|
2018-12-20 16:49:56 +01:00
|
|
|
|
DeviseUserMailer.reset_password_instructions(user, "faketoken", {})
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
|
|
def user
|
|
|
|
|
User.new(id: 10, email: "usager@example.com")
|
2018-05-14 14:21:03 +02:00
|
|
|
|
end
|
2020-02-24 11:55:29 +01:00
|
|
|
|
|
|
|
|
|
def procedure
|
|
|
|
|
Procedure.new(id: 20, libelle: 'Dotation d’Équipement des Territoires Ruraux - Exercice 2019', path: 'dotation-etr')
|
|
|
|
|
end
|
2018-05-14 14:21:03 +02:00
|
|
|
|
end
|