From 96a746175dd2215878a2781b893efaed077ca5c3 Mon Sep 17 00:00:00 2001 From: Andy Brett Date: Thu, 11 Feb 2021 10:36:50 -0800 Subject: [PATCH] update spec with new behavior --- .../order/stripe_sca_payment_authorize_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/engines/order_management/spec/services/order_management/order/stripe_sca_payment_authorize_spec.rb b/engines/order_management/spec/services/order_management/order/stripe_sca_payment_authorize_spec.rb index 81adcf72df..74a03dfcf4 100644 --- a/engines/order_management/spec/services/order_management/order/stripe_sca_payment_authorize_spec.rb +++ b/engines/order_management/spec/services/order_management/order/stripe_sca_payment_authorize_spec.rb @@ -70,8 +70,8 @@ module OrderManagement } end - it "sends an email requesting authorization and an email notifying the shop owner" do - payment_authorize.call! + it "sends an email requesting authorization and an email notifying the shop owner when requested" do + payment_authorize.extend(OrderManagement::Order::SendAuthorizationEmails).call! expect(order.errors.size).to eq 0 expect(PaymentMailer).to have_received(:authorize_payment) @@ -79,8 +79,8 @@ module OrderManagement expect(mail_mock).to have_received(:deliver_now).twice end - it "doesn't send emails if param is set to false" do - payment_authorize.call!(nil, false) + it "doesn't send emails by default" do + payment_authorize.call! expect(order.errors.size).to eq 0 expect(PaymentMailer).to_not have_received(:authorize_payment)