Fix line_item tax sum in OrderTaxAdjustmentsFetcher

This commit is contained in:
Matt-Yorkley
2020-09-12 15:41:29 +01:00
parent cdf4e88e21
commit 9481876595
2 changed files with 2 additions and 3 deletions

View File

@@ -32,7 +32,7 @@ class OrderTaxAdjustmentsFetcher
end
def line_item_adjustments
table[:adjustable_id].eq(order.line_item_ids.join(','))
table[:adjustable_id].eq_any(order.line_item_ids)
.and(table[:adjustable_type].eq('Spree::LineItem'))
end

View File

@@ -90,8 +90,7 @@ describe OrderTaxAdjustmentsFetcher do
expect(subject.size).to eq(4)
end
xit "contains tax on line_item" do
# This should be the sum of tax on all line items, but only returns tax for one.
it "contains tax on all line_items" do
expect(subject[tax_rate10]).to eq(8.0)
end