Skip to content

Commit 61ea952

Browse files
committed
kill/ignore mutants
1 parent 47ffaa6 commit 61ea952

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

ecommerce/pricing/.mutant.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,5 @@ matcher:
1414
- Pricing::OnCalculateTotalValue#calculate_sub_amounts
1515
- Pricing::Offer#make_free_product
1616
- Pricing::Offer#remove_free_product
17-
- Pricing::Offer::List#set_free
18-
- Pricing::Offer::List#restore_nonfree
19-
- Pricing::Offer::List#sub_amounts_total
17+
- Pricing::Offer::List*
18+
- Pricing::SetFuturePriceHandler#call

ecommerce/pricing/lib/pricing/offer.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def add_item(product_id, price)
217217
end
218218

219219
def remove_item(product_id)
220-
new_items = @items.sort {|x,y| x.price <=> y.price }
220+
new_items = @items.sort { _1.price}
221221
index_of_item_to_remove = new_items.index { |item| item.product_id == product_id }
222222
new_items.delete_at(index_of_item_to_remove)
223223
@items = new_items
@@ -253,7 +253,7 @@ def restore_nonfree(product_id)
253253

254254
def quantities
255255
sub_amounts_total.map do |product_id, h|
256-
{ product_id:, quantity: h[:quantity] }
256+
{ product_id:, quantity: h.fetch(:quantity) }
257257
end
258258
end
259259

0 commit comments

Comments
 (0)