mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2026-04-06 01:25:31 +00:00
* Avoid early html encoding for the remaining '=' * Make 'EMAIL_DEFAULT_SENDER' required env * Implement sender and recipient name on send e-mails nodemailer conform * Fix e-mail snapshots
39 lines
796 B
TypeScript
39 lines
796 B
TypeScript
import CONFIG from '@config/index'
|
|
|
|
CONFIG.SUPPORT_EMAIL = 'devops@ocelot.social'
|
|
|
|
// eslint-disable-next-line import/first
|
|
import { sendWrongEmail } from './sendEmail'
|
|
|
|
describe('sendWrongEmail', () => {
|
|
const data: {
|
|
name: string
|
|
email: string
|
|
locale: string
|
|
} = {
|
|
name: 'Bob &"?@\\ Baumeister',
|
|
email: 'moderator@example.org',
|
|
locale: 'en',
|
|
}
|
|
|
|
describe('English', () => {
|
|
beforeEach(() => {
|
|
data.locale = 'en'
|
|
})
|
|
|
|
it('renders correctly', async () => {
|
|
await expect(sendWrongEmail(data)).resolves.toMatchSnapshot()
|
|
})
|
|
})
|
|
|
|
describe('German', () => {
|
|
beforeEach(() => {
|
|
data.locale = 'de'
|
|
})
|
|
|
|
it('renders correctly', async () => {
|
|
await expect(sendWrongEmail(data)).resolves.toMatchSnapshot()
|
|
})
|
|
})
|
|
})
|