Correct method name for shop logo in email

This commit is contained in:
Maikel Linke
2022-06-09 15:55:28 +10:00
parent 08cc6ab169
commit dd659f16c0
2 changed files with 9 additions and 2 deletions

View File

@@ -12,7 +12,7 @@
%tr
%td{:align => "right"}
- if @shop.logo.variable?
= image_tag @shop.logo_variant(:medium), class: "float-right"
= image_tag @shop.logo_url(:medium), class: "float-right"
%span.clear
= render 'summary_overview', summary: @summary

View File

@@ -240,15 +240,22 @@ describe SubscriptionMailer, type: :mailer do
allow(summary).to receive(:order_count) { 37 }
allow(summary).to receive(:issue_count) { 0 }
allow(summary).to receive(:issues) { {} }
SubscriptionMailer.placement_summary_email(summary).deliver_now
end
it "sends the email, which notifies the enterprise that all orders were successfully processed" do
SubscriptionMailer.placement_summary_email(summary).deliver_now
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")
end
it "renders the shop's logo" do
shop.update!(logo: fixture_file_upload("logo.png", "image/png"))
SubscriptionMailer.placement_summary_email(summary).deliver_now
expect(SubscriptionMailer.deliveries.last.body).to include "logo.png"
end
end
context "when some issues were encountered while processing subscriptions" do