Added email templating, and user welcome email
This commit is contained in:
19
server/mailer.test.js
Normal file
19
server/mailer.test.js
Normal file
@@ -0,0 +1,19 @@
|
||||
/* eslint-disable flowtype/require-valid-file-annotation */
|
||||
import { Mailer } from './mailer';
|
||||
|
||||
describe('Mailer', () => {
|
||||
let fakeMailer;
|
||||
let sendMailOutput;
|
||||
|
||||
beforeEach(() => {
|
||||
fakeMailer = new Mailer();
|
||||
fakeMailer.transporter = {
|
||||
sendMail: output => (sendMailOutput = output),
|
||||
};
|
||||
});
|
||||
|
||||
test('#welcome', () => {
|
||||
fakeMailer.welcome('user@example.com');
|
||||
expect(sendMailOutput).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user