mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-25 05:45:15 +00:00
Fix line_item tax sum in OrderTaxAdjustmentsFetcher
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user