Commit 72becff
committed
Treat coupons as expired when we reach expiry date
We have a test for `test_isExpired_when_current_date_then_returns_true`, however, we didn’t quite match that. We actually relied on a small amount of time elapsing between the call to create the POSCoupon with `Date.now` and the check for whether the coupon had expired.
In some test runs, there was no measurable time change, so the test would fail.
This fixes the implementation to match the test, and general understanding of an expiry time – when you reach the time, the coupon expires.1 parent 2e05cde commit 72becff
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
0 commit comments