mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Fix mailer specs
These methods are not actually called now until the email is being delivered.
This commit is contained in:
@@ -23,14 +23,14 @@ describe Spree::OrderMailer do
|
||||
it "confirm_email_for_customer accepts an order id as an alternative to an Order object" do
|
||||
expect(Spree::Order).to receive(:find).with(order.id).and_return(order)
|
||||
expect {
|
||||
confirmation_email = Spree::OrderMailer.confirm_email_for_customer(order.id)
|
||||
Spree::OrderMailer.confirm_email_for_customer(order.id).deliver
|
||||
}.to_not raise_error
|
||||
end
|
||||
|
||||
it "cancel_email accepts an order id as an alternative to an Order object" do
|
||||
expect(Spree::Order).to receive(:find).with(order.id).and_return(order)
|
||||
expect {
|
||||
cancel_email = Spree::OrderMailer.cancel_email(order.id)
|
||||
Spree::OrderMailer.cancel_email(order.id).deliver
|
||||
}.to_not raise_error
|
||||
end
|
||||
end
|
||||
|
||||
@@ -30,7 +30,7 @@ describe Spree::ShipmentMailer do
|
||||
it "shipment_email accepts an shipment id as an alternative to an Shipment object" do
|
||||
expect(Spree::Shipment).to receive(:find).with(shipment.id).and_return(shipment)
|
||||
expect {
|
||||
shipped_email = Spree::ShipmentMailer.shipped_email(shipment.id)
|
||||
Spree::ShipmentMailer.shipped_email(shipment.id).deliver
|
||||
}.to_not raise_error
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user