Commit 05bcafe
committed
fix(promo-codes): step-3 review follow-ups
Two findings from Codex audit of 999eec1:
1. BUG — ApplyPromoCodeTask's pointer comment referenced
tests/Unit/Services/ApplyPromoCodeTaskConcurrencyTest, a file
deleted in the same commit. Repoint at the new location,
tests/Unit/Services/PreProcessReservationTaskConcurrencyTest.
(Patch applied by Codex.)
2. CONCERN — coverage parity lost the "single order qty > limit
with no prior reservation row" case from the deleted
ApplyPromoCodeTaskQuantityPerAccountTest::testRejectsWhenOrderExceedsLimit.
Restore that branch via a new PreProcessReservation test:
testSingleOrderExceedingLimitRejects (limit=1, prior=null,
qty=2 → reject; repo `add` must never be called).
Now 7/7 passing in PreProcessReservationTaskConcurrencyTest.1 parent 999eec1 commit 05bcafe
2 files changed
Lines changed: 25 additions & 2 deletions
File tree
- app/Services/Model/Imp
- tests/Unit/Services
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
820 | 820 | | |
821 | 821 | | |
822 | 822 | | |
823 | | - | |
824 | | - | |
| 823 | + | |
| 824 | + | |
825 | 825 | | |
826 | 826 | | |
827 | 827 | | |
| |||
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
134 | 157 | | |
135 | 158 | | |
136 | 159 | | |
| |||
0 commit comments