mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-04-05 07:19:14 +00:00
Unify and improve email subjects for all emails
Some subjects had a prefix (e.g. [Instance]), some subjects were misleading (e.g. failed payment email had 'Order Confirmation', some can be clearer by adding information like order number, distributor or coordinator
This commit is contained in:
@@ -13,7 +13,7 @@ RSpec.describe ReportMailer do
|
||||
let(:blob) { ReportBlob.create_locally!("customers.csv", "report content") }
|
||||
|
||||
it "notifies about a report" do
|
||||
expect(email.subject).to eq "Report ready"
|
||||
expect(email.subject).to eq "Report ready for download"
|
||||
expect(email.body).to have_content "Your report is ready for download."
|
||||
end
|
||||
|
||||
|
||||
@@ -35,9 +35,9 @@ RSpec.describe Spree::ShipmentMailer do
|
||||
}.not_to raise_error
|
||||
end
|
||||
|
||||
it "includes the distributor's name in the subject" do
|
||||
it "includes the order number and distributor's name in the subject" do
|
||||
shipment_email = Spree::ShipmentMailer.shipped_email(shipment, delivery: true)
|
||||
expect(shipment_email.subject).to include("#{distributor.name} Shipment Notification")
|
||||
expect(shipment_email.subject).to include("Shipment notification of order #{shipment.order.number} at #{distributor.name}")
|
||||
end
|
||||
|
||||
it "includes the distributor's name in the body" do
|
||||
@@ -52,6 +52,6 @@ RSpec.describe Spree::ShipmentMailer do
|
||||
|
||||
it "picked_up email has different subject" do
|
||||
shipment_email = Spree::ShipmentMailer.shipped_email(shipment, delivery: false)
|
||||
expect(shipment_email.subject).to include("#{distributor.name} Pick up Notification")
|
||||
expect(shipment_email.subject).to include("Pick up notification of order #{shipment.order.number} at #{distributor.name}")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -46,7 +46,7 @@ RSpec.describe Spree::UserMailer do
|
||||
email.deliver_now
|
||||
|
||||
expect(ActionMailer::Base.deliveries.first.subject).to include(
|
||||
"Please confirm your OFN account"
|
||||
"Please confirm your account on OFN Demo Site"
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user