mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Improve order test in paypal controller spec
This commit is contained in:
@@ -37,8 +37,11 @@ module Spree
|
||||
expect(spree_post(:confirm, payment_method_id: payment_method.id)).
|
||||
to redirect_to cart_path
|
||||
|
||||
# And does not complete processing of the payment
|
||||
expect(controller.current_order.reload.payments.count).to eq 0
|
||||
order = controller.current_order.reload
|
||||
|
||||
# Order is in "cart" state and did not complete processing of the payment
|
||||
expect(order.state).to eq "cart"
|
||||
expect(order.payments.count).to eq 0
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user