Stub or provide mailer as appropriate

This commit is contained in:
Rob Harrington
2017-11-10 15:02:36 +11:00
parent ca1485f121
commit c94badbf36
3 changed files with 14 additions and 8 deletions

View File

@@ -74,6 +74,7 @@ describe Admin::ProxyOrdersController, type: :controller do
before do
# Processing order to completion
allow(Spree::OrderMailer).to receive(:cancel_email) { double(:email, deliver: true) }
order.update_attribute(:shipping_method_id, shipping_method.id)
while !order.completed? do break unless order.next! end
proxy_order.update_attribute(:canceled_at, Time.zone.now)