From 1a97cd42de15128005a3bacbcf4525265d602b8d Mon Sep 17 00:00:00 2001 From: Mathieu Magnin Date: Thu, 11 Apr 2019 12:23:40 +0200 Subject: [PATCH] Fix missing helper in notification mailer --- app/mailers/notification_mailer.rb | 2 ++ spec/mailers/notification_mailer_spec.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/mailers/notification_mailer.rb b/app/mailers/notification_mailer.rb index 767a521b3..3ed99794e 100644 --- a/app/mailers/notification_mailer.rb +++ b/app/mailers/notification_mailer.rb @@ -6,6 +6,8 @@ # The subject and body of a Notification can be customized by each demarche. # class NotificationMailer < ApplicationMailer + helper ServiceHelper + def send_dossier_received(dossier) send_notification(dossier, dossier.procedure.received_mail_template) end diff --git a/spec/mailers/notification_mailer_spec.rb b/spec/mailers/notification_mailer_spec.rb index 1d6702ffb..219cbcae8 100644 --- a/spec/mailers/notification_mailer_spec.rb +++ b/spec/mailers/notification_mailer_spec.rb @@ -13,7 +13,7 @@ RSpec.describe NotificationMailer, type: :mailer do end let(:user) { create(:user) } - let(:dossier) { create(:dossier, user: user) } + let(:dossier) { create(:dossier, :with_service, user: user) } describe '.send_notification' do let(:email_template) { instance_double('email_template', subject_for_dossier: 'subject', body_for_dossier: 'body') }