mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 01:41:46 +03:00
13 lines
335 B
JavaScript
13 lines
335 B
JavaScript
|
const sinon = require('sinon');
|
||
|
|
||
|
const mailService = require('../../core/server/services/mail/index');
|
||
|
|
||
|
const stubMail = () => {
|
||
|
return sinon
|
||
|
.stub(mailService.GhostMailer.prototype, 'send')
|
||
|
.resolves('Mail is disabled');
|
||
|
};
|
||
|
|
||
|
module.exports.stubMail = stubMail;
|
||
|
module.exports.restoreMocks = () => sinon.restore();
|