Fix failing specs.

This commit is contained in:
Guo Xiang Tan 2017-06-16 09:39:54 +09:00
parent b5ec241716
commit cae09ee4c8

View File

@ -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)