Skip to content

Commit 40dd60a

Browse files
committed
The possibility to add products with different prices is not used yet
Let's make mutant happy for now, and don't use this feature yet
1 parent 0517787 commit 40dd60a

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

ecommerce/processes/.mutant.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,4 @@ matcher:
1616
- Processes::SyncShipmentFromPricing*
1717
- Processes::SyncInventoryFromOrdering*
1818
- Processes::NotifyPaymentsAboutOrderValue*
19-
- Processes::ThreePlusOneFree*
2019
- Processes::DetermineVatRatesOnOrderPlaced*

ecommerce/processes/lib/processes/three_plus_one_free.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def apply(event)
2424
state.with(lines:, eligible_free_product: eligible_free_product(lines))
2525
when Pricing::PriceItemRemoved
2626
lines = state.lines
27-
index_of_line_to_remove = lines.index { |line| line.fetch(:product_id) == product_id && line.fetch(:price) == event.data.fetch(:price) }
27+
index_of_line_to_remove = lines.index { |line| line.fetch(:product_id) == product_id }
2828
lines.delete_at(index_of_line_to_remove)
2929
state.with(lines:, eligible_free_product: eligible_free_product(lines))
3030
when Pricing::ProductMadeFreeForOrder

0 commit comments

Comments
 (0)