fix(andreknie.de): improve mobile dock and resource requests

This commit is contained in:
2026-07-28 20:54:08 +02:00
parent 0459daa074
commit 8236cce85c
12 changed files with 219 additions and 61 deletions
@@ -96,4 +96,20 @@ describe('backend mail safety', () => {
expect(await reserveToken(token)).toMatchObject({ status: 'processing' })
await releaseToken(token)
})
it('rejects unknown resources before any notification is sent', async () => {
const response = await fetch(`${baseUrl}/api/resource-download`, {
method: 'POST',
headers: { 'content-type': 'application/json' },
body: JSON.stringify({
name: 'Test',
email: 'test@example.invalid',
company: 'Synthetic Test',
resource_id: 'does-not-exist',
}),
})
expect(response.status).toBe(400)
expect((await response.json()).errors.resource_id).toBeTruthy()
})
})