diff --git a/spec/controllers/checkout_controller_concurrency_spec.rb b/spec/controllers/checkout_controller_concurrency_spec.rb index 6a5fcd8bad..51eefe98ae 100644 --- a/spec/controllers/checkout_controller_concurrency_spec.rb +++ b/spec/controllers/checkout_controller_concurrency_spec.rb @@ -30,8 +30,11 @@ describe CheckoutController, concurrency: true, type: :controller do # New threads start running straight away. The breakpoint is after loading # the order and before advancing the order's state and making payments. breakpoint.lock - allow(controller).to receive(:check_order_for_phantom_fees) do + expect(controller).to receive(:fire_event).with("spree.checkout.update") do breakpoint.synchronize {} + # This is what fire_event does. + # I did not find out how to call the original code otherwise. + ActiveSupport::Notifications.instrument("spree.checkout.update") end end