From ccbe33001f6347a1c02b78bdc6b3d544e1d9016f Mon Sep 17 00:00:00 2001 From: Rob Harrington Date: Fri, 2 Feb 2018 08:09:59 +1100 Subject: [PATCH] Add missing interpolation for shop name --- .../confirmation_summary_email.html.haml | 2 +- .../placement_summary_email.html.haml | 2 +- spec/mailers/standing_order_mailer_spec.rb | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/views/standing_order_mailer/confirmation_summary_email.html.haml b/app/views/standing_order_mailer/confirmation_summary_email.html.haml index 579f7d331c..1f08ba24d1 100644 --- a/app/views/standing_order_mailer/confirmation_summary_email.html.haml +++ b/app/views/standing_order_mailer/confirmation_summary_email.html.haml @@ -7,7 +7,7 @@ %h3 = t(".greeting", name: @shop.contact) %h4 - = t(".intro") + = t(".intro", shop: @shop.name) %table.column{:align => "left"} %tr %td{:align => "right"} diff --git a/app/views/standing_order_mailer/placement_summary_email.html.haml b/app/views/standing_order_mailer/placement_summary_email.html.haml index 579f7d331c..1f08ba24d1 100644 --- a/app/views/standing_order_mailer/placement_summary_email.html.haml +++ b/app/views/standing_order_mailer/placement_summary_email.html.haml @@ -7,7 +7,7 @@ %h3 = t(".greeting", name: @shop.contact) %h4 - = t(".intro") + = t(".intro", shop: @shop.name) %table.column{:align => "left"} %tr %td{:align => "right"} diff --git a/spec/mailers/standing_order_mailer_spec.rb b/spec/mailers/standing_order_mailer_spec.rb index 18c6b9a225..95bae3845d 100644 --- a/spec/mailers/standing_order_mailer_spec.rb +++ b/spec/mailers/standing_order_mailer_spec.rb @@ -121,7 +121,7 @@ describe StandingOrderMailer do end it "sends the email, which notifies the enterprise that all orders were successfully processed" do - expect(body).to include I18n.t("#{scope}.placement_summary_email.intro") + expect(body).to include I18n.t("#{scope}.placement_summary_email.intro", shop: shop.name) expect(body).to include I18n.t("#{scope}.summary_overview.total", count: 37) expect(body).to include I18n.t("#{scope}.summary_overview.success_all") expect(body).to_not include I18n.t("#{scope}.summary_overview.issues") @@ -143,7 +143,7 @@ describe StandingOrderMailer do context "when no unrecorded issues are present" do it "sends the email, which notifies the enterprise that some issues were encountered" do StandingOrderMailer.placement_summary_email(summary).deliver - expect(body).to include I18n.t("#{scope}.placement_summary_email.intro") + expect(body).to include I18n.t("#{scope}.placement_summary_email.intro", shop: shop.name) expect(body).to include I18n.t("#{scope}.summary_overview.total", count: 37) expect(body).to include I18n.t("#{scope}.summary_overview.success_some", count: 35) expect(body).to include I18n.t("#{scope}.summary_overview.issues") @@ -197,7 +197,7 @@ describe StandingOrderMailer do end it "sends the email, which notifies the enterprise that some issues were encountered" do - expect(body).to include I18n.t("#{scope}.placement_summary_email.intro") + expect(body).to include I18n.t("#{scope}.placement_summary_email.intro", shop: shop.name) expect(body).to include I18n.t("#{scope}.summary_overview.total", count: 2) expect(body).to include I18n.t("#{scope}.summary_overview.success_zero") expect(body).to include I18n.t("#{scope}.summary_overview.issues") @@ -231,7 +231,7 @@ describe StandingOrderMailer do end it "sends the email, which notifies the enterprise that all orders were successfully processed" do - expect(body).to include I18n.t("#{scope}.confirmation_summary_email.intro") + expect(body).to include I18n.t("#{scope}.confirmation_summary_email.intro", shop: shop.name) expect(body).to include I18n.t("#{scope}.summary_overview.total", count: 37) expect(body).to include I18n.t("#{scope}.summary_overview.success_all") expect(body).to_not include I18n.t("#{scope}.summary_overview.issues") @@ -253,7 +253,7 @@ describe StandingOrderMailer do context "when no unrecorded issues are present" do it "sends the email, which notifies the enterprise that some issues were encountered" do StandingOrderMailer.confirmation_summary_email(summary).deliver - expect(body).to include I18n.t("#{scope}.confirmation_summary_email.intro") + expect(body).to include I18n.t("#{scope}.confirmation_summary_email.intro", shop: shop.name) expect(body).to include I18n.t("#{scope}.summary_overview.total", count: 37) expect(body).to include I18n.t("#{scope}.summary_overview.success_some", count: 35) expect(body).to include I18n.t("#{scope}.summary_overview.issues") @@ -307,7 +307,7 @@ describe StandingOrderMailer do end it "sends the email, which notifies the enterprise that some issues were encountered" do - expect(body).to include I18n.t("#{scope}.confirmation_summary_email.intro") + expect(body).to include I18n.t("#{scope}.confirmation_summary_email.intro", shop: shop.name) expect(body).to include I18n.t("#{scope}.summary_overview.total", count: 2) expect(body).to include I18n.t("#{scope}.summary_overview.success_zero") expect(body).to include I18n.t("#{scope}.summary_overview.issues")