This commit is contained in:
Leandro Facchinetti 2020-03-21 03:31:30 -04:00
parent c9eb7cdcbd
commit 69e9f5ffbb
1 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
import { webServer, emailServer, feedEmail } from "."; import { webServer, emailServer } from ".";
import nodemailer from "nodemailer"; import nodemailer from "nodemailer";
import axios from "axios"; import axios from "axios";
import qs from "qs"; import qs from "qs";
@ -20,7 +20,7 @@ describe("receive email", () => {
const identifier = await createFeed(); const identifier = await createFeed();
await transporter.sendMail({ await transporter.sendMail({
from: "publisher@example.com", from: "publisher@example.com",
to: feedEmail(identifier), to: `${identifier}@kill-the-newsletter.com`,
subject: "New Message", subject: "New Message",
html: "<p>HTML content</p>" html: "<p>HTML content</p>"
}); });
@ -34,7 +34,7 @@ describe("receive email", () => {
const identifier = await createFeed(); const identifier = await createFeed();
await transporter.sendMail({ await transporter.sendMail({
from: "publisher@example.com", from: "publisher@example.com",
to: feedEmail(identifier), to: `${identifier}@kill-the-newsletter.com`,
subject: "New Message", subject: "New Message",
text: "TEXT content" text: "TEXT content"
}); });
@ -47,7 +47,7 @@ describe("receive email", () => {
for (const repetition of [...new Array(4).keys()]) for (const repetition of [...new Array(4).keys()])
await transporter.sendMail({ await transporter.sendMail({
from: "publisher@example.com", from: "publisher@example.com",
to: feedEmail(identifier), to: `${identifier}@kill-the-newsletter.com`,
subject: "New Message", subject: "New Message",
text: `REPETITION ${repetition} `.repeat(10_000) text: `REPETITION ${repetition} `.repeat(10_000)
}); });