Mail relay: the 1.7.0 test allows the status read that follows a new enrolment

Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-11-25 22:14:09 +01:00
co-authored by Claude Fable 5.2
parent fef2c51bae
commit 1a11cefffa
+2 -1
View File
@@ -815,7 +815,8 @@ describe('review of 7d766b6: R-1 to R-7, R-11, and four mutations it found uncau
await updateRelayStore(payload, (current) => ({ ...current, token: foreign }))
const before = fake.requests.length
expect((await sendThroughRelay(payload, options, { ...MESSAGE, subject: 'As myself' })).sent).toBe(true)
expect(fake.requests.slice(before).map((r) => r.path)).toEqual(['/v1/send', '/v1/enrol', '/v1/send'])
// (a status read follows: what was known about the service was forgotten with the token)
expect(fake.requests.slice(before).map((r) => r.path).slice(0, 3)).toEqual(['/v1/send', '/v1/enrol', '/v1/send'])
expect(fake.outbox.at(-1)).toMatchObject({ host: HOST, subject: 'As myself' })
expect((await readRelayStore(payload)).token).not.toBe(foreign)
// forgotten here, not revoked there