From ada25fa2b28dcc6ae4e242d307fc309e1c20ba65 Mon Sep 17 00:00:00 2001 From: Luis Ramos Date: Thu, 3 Dec 2020 00:10:15 +0000 Subject: [PATCH] Improve stripe spec I am not sure why this was passing without these stubbed requests for the second order, but now they were correctly failing. This commit fixes the spec. --- spec/features/consumer/shopping/checkout_stripe_spec.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/features/consumer/shopping/checkout_stripe_spec.rb b/spec/features/consumer/shopping/checkout_stripe_spec.rb index e3a32718aa..2346c2299c 100644 --- a/spec/features/consumer/shopping/checkout_stripe_spec.rb +++ b/spec/features/consumer/shopping/checkout_stripe_spec.rb @@ -228,6 +228,8 @@ feature "Check out with Stripe", js: true do new_order = create(:order, user: user, order_cycle: order_cycle, distributor: distributor, bill_address_id: nil, ship_address_id: nil) set_order(new_order) add_product_to_cart(new_order, product, quantity: 10) + stub_payment_intents_post_request order: new_order + stub_successful_capture_request order: new_order # Checkout with saved card visit checkout_path