Improve order test in paypal controller spec

This commit is contained in:
Matt-Yorkley
2020-11-27 11:42:06 +00:00
parent 2fa2a30c67
commit c4cfc1dc05

View File

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