0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00
ghost/test/unit/adapters/scheduling/index_spec.js

30 lines
892 B
JavaScript
Raw Normal View History

const should = require('should');
const sinon = require('sinon');
const rewire = require('rewire');
const Promise = require('bluebird');
const postScheduling = require('../../../../core/server/adapters/scheduling/post-scheduling');
describe('Scheduling', function () {
const scope = {};
before(function () {
sinon.stub(postScheduling, 'init').returns(Promise.resolve());
scope.scheduling = rewire('../../../../core/server/adapters/scheduling');
});
after(function () {
sinon.restore();
});
describe('success', function () {
it('ensure post scheduling init is called', function (done) {
scope.scheduling.init({
postScheduling: {}
}).then(function () {
postScheduling.init.calledOnce.should.eql(true);
done();
}).catch(done);
});
});
});