Skip to content

Commit e08fcea

Browse files
committed
kill mutants
1 parent a35c145 commit e08fcea

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

ecommerce/pricing/test/time_promotion_test.rb

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,12 @@ def create_time_promotion(**kwargs)
3838
end
3939

4040
class DiscountWithTimePromotionTest < Test
41-
cover "Pricing*"
41+
cover "Pricing::Offer*"
4242

4343
def test_calculates_total_value_with_time_promotion
4444
order_id = SecureRandom.uuid
4545
product_1_id = SecureRandom.uuid
4646
set_price(product_1_id, 20)
47-
add_item(order_id, product_1_id)
4847
stream = stream_name(order_id)
4948
time_promotion_id = SecureRandom.uuid
5049
start_time = Time.current - 1
@@ -55,14 +54,24 @@ def test_calculates_total_value_with_time_promotion
5554

5655
assert_events_contain(
5756
stream,
57+
PriceItemAdded.new(
58+
data: {
59+
order_id: order_id,
60+
product_id: product_1_id,
61+
base_price: 20,
62+
price: 10,
63+
base_total_value: 20,
64+
total_value: 10,
65+
}
66+
),
5867
OrderTotalValueCalculated.new(
5968
data: {
6069
order_id: order_id,
6170
total_amount: 20,
6271
discounted_amount: 10
6372
}
6473
)
65-
) { calculate_total_value(order_id) }
74+
) { add_item(order_id, product_1_id) }
6675
end
6776

6877
def test_calculates_sub_amounts_with_combined_discounts

0 commit comments

Comments
 (0)