From 9b2801db2404ebba2e56143ecc1af42c14008acd Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Tue, 7 Dec 2021 19:41:16 +0000 Subject: [PATCH] Fix calls to private method #expire_current_order in specs --- spec/controllers/checkout_controller_spec.rb | 4 ++-- spec/controllers/payment_gateways/paypal_controller_spec.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/controllers/checkout_controller_spec.rb b/spec/controllers/checkout_controller_spec.rb index 4663cc1941..3663b9fc23 100644 --- a/spec/controllers/checkout_controller_spec.rb +++ b/spec/controllers/checkout_controller_spec.rb @@ -315,11 +315,11 @@ describe CheckoutController, type: :controller do describe '#expire_current_order' do it 'empties the order_id of the session' do expect(session).to receive(:[]=).with(:order_id, nil) - controller.expire_current_order + controller.send(:expire_current_order) end it 'resets the @current_order ivar' do - controller.expire_current_order + controller.send(:expire_current_order) expect(controller.instance_variable_get(:@current_order)).to be_nil end end diff --git a/spec/controllers/payment_gateways/paypal_controller_spec.rb b/spec/controllers/payment_gateways/paypal_controller_spec.rb index c610e88e8d..a3095a8222 100644 --- a/spec/controllers/payment_gateways/paypal_controller_spec.rb +++ b/spec/controllers/payment_gateways/paypal_controller_spec.rb @@ -104,11 +104,11 @@ module PaymentGateways describe '#expire_current_order' do it 'empties the order_id of the session' do expect(session).to receive(:[]=).with(:order_id, nil) - controller.expire_current_order + controller.send(:expire_current_order) end it 'resets the @current_order ivar' do - controller.expire_current_order + controller.send(:expire_current_order) expect(controller.instance_variable_get(:@current_order)).to be_nil end end