mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2026-01-19 11:21:26 +00:00
* localized registration email * localized email verification email * localized reset password email
36 lines
726 B
TypeScript
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()
|
|
})
|
|
})
|
|
})
|