Add text in the payload in the test

This commit is contained in:
Hongbo Wu
2023-01-18 18:25:32 +08:00
parent d60890d154
commit 064ea5a782

View File

@ -37,6 +37,7 @@ describe('Emails Router', () => {
const to = newsletterEmail
const subject = 'test subject'
const html = 'test html'
const text = 'test text'
beforeEach(async () => {
sinon.replace(
@ -60,7 +61,7 @@ describe('Emails Router', () => {
const data = {
message: {
data: Buffer.from(
JSON.stringify({ from, to, subject, html })
JSON.stringify({ from, to, subject, html, text })
).toString('base64'),
publishTime: new Date().toISOString(),
},
@ -82,7 +83,7 @@ describe('Emails Router', () => {
const data = {
message: {
data: Buffer.from(
JSON.stringify({ from, to, subject, html })
JSON.stringify({ from, to, subject, html, text })
).toString('base64'),
publishTime: new Date().toISOString(),
},