BOGOF discount for ZERO2W

This commit is contained in:
David Underwood
2026-07-15 10:57:09 -04:00
parent dadfeed768
commit d21373035e
3 changed files with 70 additions and 3 deletions
+18
View File
@@ -34,4 +34,22 @@ class TestCheckout < Minitest::Test
def test_that_an_empty_checkout_total_is_zero
assert_equal 0.00, @checkout.total
end
# Discounts
def test_that_bogof_applied
4.times do
@checkout.add(:ZERO2W)
end
assert_equal 30.00, @checkout.total
end
def test_that_bogof_applied_with_odd_number
5.times do
@checkout.add(:ZERO2W)
end
assert_equal 45.00, @checkout.total
end
end