mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-26 01:33:22 +00:00
Asserts that the order shipment and pick up emails have the distributors email as reply to address
This commit is contained in:
@@ -55,4 +55,14 @@ RSpec.describe Spree::ShipmentMailer do
|
||||
shipment_email = Spree::ShipmentMailer.shipped_email(shipment, delivery: false)
|
||||
expect(shipment_email.subject).to include("#{distributor.name} Pick up Notification")
|
||||
end
|
||||
|
||||
it "picked_up email has as the reply to email as the distributor" do
|
||||
shipment_email = Spree::ShipmentMailer.shipped_email(shipment, delivery: false)
|
||||
expect(shipment_email.reply_to).to eq([distributor.contact.email])
|
||||
end
|
||||
|
||||
it "shipment_email email has as the reply to email as the distributor" do
|
||||
shipment_email = Spree::ShipmentMailer.shipped_email(shipment, delivery: true)
|
||||
expect(shipment_email.reply_to).to eq([distributor.contact.email])
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user