mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-27 22:49:56 -05:00
Fixed CI
no issue - The test was initialized backwards... causing the job manager to start without "models" being fully initialized
This commit is contained in:
parent
1606a10ff8
commit
ec0d548031
1 changed files with 4 additions and 2 deletions
|
@ -2,7 +2,6 @@ require('should');
|
|||
const {agentProvider, fixtureManager, mockManager} = require('../../utils/e2e-framework');
|
||||
const moment = require('moment');
|
||||
const ObjectId = require('bson-objectid');
|
||||
const {_sendEmailJob} = require('../../../core/server/services/mega/mega');
|
||||
const models = require('../../../core/server/models');
|
||||
const sinon = require('sinon');
|
||||
const mailgunProvider = require('../../../core/server/services/bulk-email/mailgun');
|
||||
|
@ -46,17 +45,20 @@ async function createPublishedPostEmail() {
|
|||
}
|
||||
|
||||
describe('MEGA', function () {
|
||||
let _sendEmailJob;
|
||||
|
||||
describe('sendEmailJob', function () {
|
||||
before(async function () {
|
||||
agent = await agentProvider.getAdminAPIAgent();
|
||||
await fixtureManager.init('newsletters', 'members:newsletters');
|
||||
await agent.loginAsOwner();
|
||||
_sendEmailJob = require('../../../core/server/services/mega/mega')._sendEmailJob;
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
mockManager.restore();
|
||||
});
|
||||
|
||||
|
||||
it('Can send a scheduled post email', async function () {
|
||||
sinon.stub(mailgunProvider, 'getInstance').returns({});
|
||||
sinon.stub(mailgunProvider, 'send').callsFake(async () => {
|
||||
|
|
Loading…
Add table
Reference in a new issue