authelia/server/test/mocks/nodemailer.ts

25 lines
459 B
TypeScript
Raw Normal View History

2017-05-20 14:49:05 +07:00
import sinon = require("sinon");
2017-05-22 03:45:54 +07:00
export interface NodemailerMock {
createTransport: sinon.SinonStub;
}
export function NodemailerMock(): NodemailerMock {
return {
createTransport: sinon.stub()
};
}
export interface NodemailerTransporterMock {
sendMail: sinon.SinonStub;
2017-09-25 01:55:11 +07:00
verify: sinon.SinonStub;
2017-05-22 03:45:54 +07:00
}
export function NodemailerTransporterMock() {
return {
2017-09-25 01:55:11 +07:00
sendMail: sinon.stub(),
verify: sinon.stub()
2017-05-22 03:45:54 +07:00
};
}