fix(andreknie.de): harden personal data lifecycle
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { isMailerReady, MailerNotReadyError, sendConfirmationEmail } from './mailer.js'
|
||||
|
||||
describe('mailer readiness', () => {
|
||||
it('reports missing SMTP configuration without exposing credentials', async () => {
|
||||
expect(isMailerReady()).toBe(false)
|
||||
await expect(sendConfirmationEmail('test@example.invalid', 'contact', 'synthetic-token'))
|
||||
.rejects.toBeInstanceOf(MailerNotReadyError)
|
||||
await expect(sendConfirmationEmail('test@example.invalid', 'contact', 'synthetic-token'))
|
||||
.rejects.toMatchObject({ code: 'MAILER_NOT_READY' })
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user