0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00
ghost/test/unit/adapters/scheduling/index_spec.js
Hannah Wolfe 7f1d3ebc07
Move tests from core to root (#11700)
- move all test files from core/test to test/
- updated all imports and other references
- all code inside of core/ is then application code
- tests are correctly at the root level
- consistent with other repos/projects

Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2020-03-30 16:26:47 +01:00

29 lines
880 B
JavaScript

var should = require('should'),
sinon = require('sinon'),
rewire = require('rewire'),
Promise = require('bluebird'),
postScheduling = require('../../../../core/server/adapters/scheduling/post-scheduling');
describe('Scheduling', function () {
var 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);
});
});
});