Commit 32a056d
committed
test(client/auth): make the expiry-discard test's storage assertions non-vacuous
MockTokenStorage stores tokens by reference and _initialize loads that
same object into context.current_tokens, so the discard's in-place
refresh-token trim reached the stored object even without the
set_tokens persistence call - the storage-side assertions in
test_expired_stored_registration_is_discarded_and_the_flow_re_registers
passed vacuously. Re-seed storage with a distinct copy after the load
so those assertions pass only if the discard actually persists the
trimmed tokens (verified by mutation: deleting the set_tokens call now
fails the test).1 parent e53e526 commit 32a056d
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3353 | 3353 | | |
3354 | 3354 | | |
3355 | 3355 | | |
| 3356 | + | |
| 3357 | + | |
| 3358 | + | |
| 3359 | + | |
| 3360 | + | |
| 3361 | + | |
3356 | 3362 | | |
3357 | 3363 | | |
3358 | 3364 | | |
| |||
0 commit comments