Fix mailer specs

These methods are not actually called now until the email is being delivered.
This commit is contained in:
Matt-Yorkley
2020-11-06 15:21:00 +00:00
parent eb040de422
commit 62b80043ba
2 changed files with 3 additions and 3 deletions

View File

@@ -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

View File

@@ -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