From c91f02a94a85ccc670bceb8cc2f771fc048eb9ad Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Tue, 16 Mar 2021 16:52:30 +0000 Subject: [PATCH] Update order totals in paypal test setup --- spec/services/paypal_items_builder_spec.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/services/paypal_items_builder_spec.rb b/spec/services/paypal_items_builder_spec.rb index c6eb0b6d08..86a6646878 100644 --- a/spec/services/paypal_items_builder_spec.rb +++ b/spec/services/paypal_items_builder_spec.rb @@ -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)