From cae09ee4c807c01da2c6fa70e65112f289b010ae Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Fri, 16 Jun 2017 09:39:54 +0900 Subject: [PATCH] Fix failing specs. --- spec/mailers/user_notifications_spec.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/spec/mailers/user_notifications_spec.rb b/spec/mailers/user_notifications_spec.rb index 39ed87a35dc..e68158580c0 100644 --- a/spec/mailers/user_notifications_spec.rb +++ b/spec/mailers/user_notifications_spec.rb @@ -537,7 +537,16 @@ describe UserNotifications do end context "when customized" do - let(:custom_body) { "You are now officially notified." } + let(:custom_body) do + body = <<~BODY + You are now officially notified. + %{header_instructions} + %{message} %{respond_instructions} + BODY + + body << "%{context}" if notification_type != :invited_to_topic + body + end before do TranslationOverride.upsert!("en", "user_notifications.user_#{notification_type}.text_body_template", custom_body)