fix(andreknie.de): close package two review gaps

This commit is contained in:
2026-07-28 21:13:21 +02:00
parent 8236cce85c
commit 0334252fed
5 changed files with 91 additions and 7 deletions
@@ -112,4 +112,21 @@ describe('backend mail safety', () => {
expect(response.status).toBe(400)
expect((await response.json()).errors.resource_id).toBeTruthy()
})
it('silently accepts resource honeypot submissions', 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',
company_website: 'https://bot.example.invalid',
}),
})
expect(response.status).toBe(201)
expect((await response.json()).ok).toBe(true)
})
})