mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
25 lines
854 B
TypeScript
25 lines
854 B
TypeScript
import { IMailSenderBuilder } from "../../../src/lib/notifiers/IMailSenderBuilder";
|
|
import BluebirdPromise = require("bluebird");
|
|
import Nodemailer = require("nodemailer");
|
|
import Sinon = require("sinon");
|
|
import { IMailSender } from "../../../src/lib/notifiers/IMailSender";
|
|
import { SmtpNotifierConfiguration, EmailNotifierConfiguration } from "../../../src/lib/configuration/Configuration";
|
|
|
|
export class MailSenderBuilderStub implements IMailSenderBuilder {
|
|
buildEmailStub: Sinon.SinonStub;
|
|
buildSmtpStub: Sinon.SinonStub;
|
|
|
|
constructor() {
|
|
this.buildEmailStub = Sinon.stub();
|
|
this.buildSmtpStub = Sinon.stub();
|
|
}
|
|
|
|
buildEmail(options: EmailNotifierConfiguration): IMailSender {
|
|
return this.buildEmailStub(options);
|
|
}
|
|
|
|
buildSmtp(options: SmtpNotifierConfiguration): IMailSender {
|
|
return this.buildSmtpStub(options);
|
|
}
|
|
|
|
} |