authelia/server/test/mocks/nodemailer.ts

25 lines
459 B
TypeScript
Raw Normal View History

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