mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Correct method name for shop logo in email
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user