fix(andreknie.de): close package two review gaps
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { isMailerReady, MailerNotReadyError, sendConfirmationEmail } from './mailer.js'
|
||||
import {
|
||||
buildStakeholderMessage,
|
||||
isMailerReady,
|
||||
MailerNotReadyError,
|
||||
sendConfirmationEmail,
|
||||
} from './mailer.js'
|
||||
|
||||
describe('mailer readiness', () => {
|
||||
it('reports missing SMTP configuration without exposing credentials', async () => {
|
||||
@@ -10,3 +15,24 @@ describe('mailer readiness', () => {
|
||||
.rejects.toMatchObject({ code: 'MAILER_NOT_READY' })
|
||||
})
|
||||
})
|
||||
|
||||
describe('stakeholder notification content', () => {
|
||||
const data = {
|
||||
name: 'Synthetic Test',
|
||||
email: 'test@example.invalid',
|
||||
}
|
||||
|
||||
it('adds the manual profile instruction to resource requests', () => {
|
||||
const message = buildStakeholderMessage('resource-download', data)
|
||||
|
||||
expect(message).toContain('ein aktuelles Profil von André verschicken')
|
||||
expect(message).toContain('name: Synthetic Test')
|
||||
})
|
||||
|
||||
it('does not add the resource instruction to contact notifications', () => {
|
||||
const message = buildStakeholderMessage('contact', data)
|
||||
|
||||
expect(message).not.toContain('ein aktuelles Profil von André verschicken')
|
||||
expect(message).toBe('name: Synthetic Test\nemail: test@example.invalid')
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user