Ocelot-Social/backend/src/emails/sendResetPasswordMail.spec.ts
Moriz Wahl 65f764f6d9
feat(backend): signup email localized (#8459)
* localized registration email

* localized email verification email

* localized reset password email
2025-05-05 20:44:14 +02:00

36 lines
726 B
TypeScript

import { sendResetPasswordMail } from './sendEmail'
describe('sendResetPasswordMail', () => {
const data: {
email: string
nonce: string
locale: string
name: string
} = {
email: 'user@example.org',
nonce: '123456',
locale: 'en',
name: 'Jenny Rostock',
}
describe('English', () => {
beforeEach(() => {
data.locale = 'en'
})
it('renders correctly', async () => {
await expect(sendResetPasswordMail(data)).resolves.toMatchSnapshot()
})
})
describe('German', () => {
beforeEach(() => {
data.locale = 'de'
})
it('renders correctly', async () => {
await expect(sendResetPasswordMail(data)).resolves.toMatchSnapshot()
})
})
})