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.
This commit is contained in:
Luis Ramos
2020-12-03 00:10:15 +00:00
parent 480dfdf961
commit ada25fa2b2

View File

@@ -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