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

16 lines
687 B
Ruby
Raw Normal View History

2021-04-15 12:22:40 +02:00
class ExpertMailerPreview < ActionMailer::Preview
2021-04-12 10:19:49 +02:00
def send_dossier_decision
2022-10-06 15:17:54 +02:00
procedure = Procedure.new(id: 1, libelle: 'Démarche pour faire des marches')
2021-04-12 10:19:49 +02:00
dossier = Dossier.new(id: 1, procedure: procedure)
2022-10-06 15:17:54 +02:00
2021-04-12 10:19:49 +02:00
instructeur = Instructeur.new(id: 1, user: User.new(email: 'jeanmichel.de-chauvigny@exemple.fr'))
2022-10-06 15:17:54 +02:00
expert = Expert.new(id: 1, user: User.new(email: 'moussa.kanga@exemple.fr'))
2021-04-12 10:19:49 +02:00
experts_procedure = ExpertsProcedure.new(expert: expert, procedure: procedure, allow_decision_access: true)
2022-10-06 15:17:54 +02:00
avis = Avis.new(id: 1, email: 'test@exemple.fr', claimant: instructeur, dossier:, experts_procedure:, expert:)
ExpertMailer.send_dossier_decision_v2(avis)
2021-04-12 10:19:49 +02:00
end
end