Update order totals in paypal test setup

This commit is contained in:
Matt-Yorkley
2021-03-16 16:52:30 +00:00
parent e8a256ecc5
commit c91f02a94a

View File

@@ -56,6 +56,8 @@ describe PaypalItemsBuilder do
amount: 23, originator: enterprise_fee, state: "closed")
}
before { order.update! }
it "should add up to the order total, minus any additional tax and the shipping cost" do
items_total = items.sum { |i| i[:Quantity] * i[:Amount][:value] }
order_tax_total = order.all_adjustments.tax.additional.sum(:amount)