diff --git a/spec/mailers/previews/dossier_mailer_preview.rb b/spec/mailers/previews/dossier_mailer_preview.rb index d34d4f0e6..8ac4eab87 100644 --- a/spec/mailers/previews/dossier_mailer_preview.rb +++ b/spec/mailers/previews/dossier_mailer_preview.rb @@ -1,7 +1,7 @@ # Preview all emails at http://localhost:3000/rails/mailers/dossier_mailer class DossierMailerPreview < ActionMailer::Preview def notify_new_draft - DossierMailer.notify_new_draft(dossier) + DossierMailer.notify_new_draft(draft) end def notify_new_answer @@ -26,11 +26,24 @@ class DossierMailerPreview < ActionMailer::Preview DeletedDossier.new(dossier_id: 1, procedure: procedure) end + def draft + Dossier.new(id: 47882, procedure: procedure, user: User.new(email: "usager@example.com")) + end + def dossier - Dossier.new(id: 1, procedure: procedure, user: User.new(email: "usager@example.com")) + Dossier.new(id: 47882, state: :en_instruction, procedure: procedure, user: User.new(email: "usager@example.com")) end def procedure - Procedure.new(libelle: 'Démarche pour des marches') + Procedure.new(libelle: 'Dotation d’Équipement des Territoires Ruraux - Exercice 2019', service: service, logo: Rack::Test::UploadedFile.new("./spec/fixtures/files/logo_test_procedure.png", 'image/png')) + end + + def service + Service.new( + nom: 'Direction du Territoire des Vosges', + email: 'prms@ddt.vosges.gouv.fr', + telephone: '01 34 22 33 85', + horaires: 'Du lundi au vendredi, de 9 h à 18 h' + ) end end