b9e0668d7d
* First pass (working) collection export to zip * Add export confirmation screen * 👕 * Refactor * Job for team export, move to tmp file, settings UI * Export all collections job * 👕 * Add specs * Clarify UI
22 lines
501 B
JavaScript
22 lines
501 B
JavaScript
/* eslint-disable flowtype/require-valid-file-annotation */
|
|
import Mailer from './mailer';
|
|
|
|
describe('Mailer', () => {
|
|
let fakeMailer;
|
|
let sendMailOutput;
|
|
|
|
beforeEach(() => {
|
|
process.env.SMTP_FROM_EMAIL = 'hello@example.com';
|
|
|
|
fakeMailer = new Mailer();
|
|
fakeMailer.transporter = {
|
|
sendMail: output => (sendMailOutput = output),
|
|
};
|
|
});
|
|
|
|
test('#welcome', () => {
|
|
fakeMailer.welcome({ to: 'user@example.com' });
|
|
expect(sendMailOutput).toMatchSnapshot();
|
|
});
|
|
});
|