Fix email unit test
This commit is contained in:
parent
e259c0f51f
commit
1c53ff7f17
@ -9,11 +9,11 @@ describe('Email Unit Tests', () => {
|
|||||||
let email;
|
let email;
|
||||||
let sendFnStub;
|
let sendFnStub;
|
||||||
|
|
||||||
const template = {
|
const template = () => ({
|
||||||
subject: 'foo',
|
subject: 'foo',
|
||||||
text: 'bar',
|
text: 'bar',
|
||||||
html: '<strong>bar</strong>'
|
html: '<strong>bar</strong>'
|
||||||
};
|
});
|
||||||
const sender = {
|
const sender = {
|
||||||
name: 'Foo Bar',
|
name: 'Foo Bar',
|
||||||
email: 'foo@bar.com'
|
email: 'foo@bar.com'
|
||||||
@ -41,7 +41,7 @@ describe('Email Unit Tests', () => {
|
|||||||
|
|
||||||
sendFnStub = sinon.stub();
|
sendFnStub = sinon.stub();
|
||||||
sandbox.stub(nodemailer, 'createTransport').returns({
|
sandbox.stub(nodemailer, 'createTransport').returns({
|
||||||
templateSender: () => sendFnStub
|
sendMail: sendFnStub
|
||||||
});
|
});
|
||||||
|
|
||||||
sandbox.stub(log);
|
sandbox.stub(log);
|
||||||
|
Loading…
Reference in New Issue
Block a user