Skip to content

Commit f9a2383

Browse files
Fix pricing and authentication mutant coverage
Add specific cover directives to pricing tests so mutant's test partitioning assigns the right tests to Offer, Discounts, and TimePromotion subjects. Add Authentication::Test* to ignore list.
1 parent c3664fe commit f9a2383

8 files changed

Lines changed: 10 additions & 4 deletions

File tree

domains/authentication/.mutant.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ matcher:
88
subjects:
99
- Authentication*
1010
ignore:
11+
- Authentication::Test*
1112
- Authentication::Configuration#call

domains/pricing/test/draft_offer_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
module Pricing
44
class DraftOfferTest < Test
5-
cover "Pricing*"
5+
cover "Pricing::Offer*"
66

77
def test_draft_offer
88
order_id = SecureRandom.uuid

domains/pricing/test/free_products_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
module Pricing
44
class FreeProductsTest < Test
5-
cover "Pricing*"
5+
cover "Pricing::Offer*"
66

77
def test_making_product_free_possible_when_order_is_eligible
88
product_1_id = SecureRandom.uuid

domains/pricing/test/offer_lifecycle_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
module Pricing
44
class OfferLifecycleTest < Test
5-
cover "Pricing*"
5+
cover "Pricing::Offer*"
66

77
def test_accept_draft_offer
88
product_id = SecureRandom.uuid

domains/pricing/test/pricing_test.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
module Pricing
44
class PricingTest < Test
55
cover "Pricing*"
6+
cover "Pricing::Offer*"
7+
cover "Pricing::Discounts*"
68

79
def test_sets_time_promotion_discount
810
order_id = SecureRandom.uuid

domains/pricing/test/simple_offer_test.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
module Pricing
44
class SimpleOfferTest < Test
55
cover "Pricing::Offer*"
6+
cover "Pricing::Discounts*"
67

78
def test_adding
89
product_id = SecureRandom.uuid

domains/pricing/test/time_promotion_test.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ def create_time_promotion(**kwargs)
3939

4040
class DiscountWithTimePromotionTest < Test
4141
cover "Pricing::Offer*"
42+
cover "Pricing::TimePromotion*"
4243

4344
def test_calculates_total_value_with_time_promotion
4445
order_id = SecureRandom.uuid

domains/pricing/test/use_coupon_test.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
module Pricing
44
class UseCouponTest < Test
5-
cover "Pricing*"
5+
cover "Pricing::Offer*"
6+
cover "Pricing::Discounts*"
67

78
def test_coupon_is_used
89
product_1_id = SecureRandom.uuid

0 commit comments

Comments
 (0)