Merge pull request #7135 from Matt-Yorkley/paypal-spec-setup

Update order totals in paypal test setup
This commit is contained in:
Andy Brett
2021-03-16 10:22:48 -07:00
committed by GitHub

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)