Moved mailService stub closer to it's usecase

This commit is contained in:
Nazar Gargol 2019-07-30 16:09:54 +02:00
parent dae69072f6
commit 27523e2ed7

View File

@ -12,14 +12,6 @@ let request;
describe.only('Authentication API v2', function () {
let ghostServer;
beforeEach(function () {
sinon.stub(mailService.GhostMailer.prototype, 'send').resolves('Mail is disabled');
});
afterEach(function () {
sinon.restore();
});
describe('Blog setup', function () {
before(function () {
return ghost({forceStart: true})
@ -29,6 +21,14 @@ describe.only('Authentication API v2', function () {
});
});
beforeEach(function () {
sinon.stub(mailService.GhostMailer.prototype, 'send').resolves('Mail is disabled');
});
afterEach(function () {
sinon.restore();
});
it('is setup? no', function () {
return request
.get(localUtils.API.getApiQuery('authentication/setup'))