mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-03 02:21:33 +00:00
Use :order_with_totals in ProcessPaymentIntent
If we just use the :order factory here, it has no line items and no total, which means when we try to push it into complete state, the #requires_payment? check fails because the order total is zero, which means the call to #process_payments is ignored
This commit is contained in:
@@ -7,7 +7,9 @@ describe ProcessPaymentIntent do
|
||||
|
||||
describe "processing a payment intent" do
|
||||
let(:customer) { create(:customer) }
|
||||
let(:order) { create(:order, customer: customer, distributor: customer.enterprise, state: "payment") }
|
||||
let(:order) {
|
||||
create(:order_with_totals, customer: customer, distributor: customer.enterprise, state: "payment")
|
||||
}
|
||||
let(:payment_method) { create(:stripe_sca_payment_method) }
|
||||
let!(:payment) { create(
|
||||
:payment,
|
||||
|
||||
Reference in New Issue
Block a user