0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00
ghost/core/test/unit/ghost_spec.js
Sebastian Gierlinger 078f464197 remove ghost.settings and ghost.notifications
covers 90% of #755
- moved ghost.settings to api.settings
- moved ghost.notifications to api.notifications
- split up api/index.js to notifications.js, posts.js, settings.js,
tags.js and users.js
- added instance.globals as temp workaround for blogglobals (Known
issue: blog title and blog description are updated after restart only)
- added webroot to config() to remove `var root = ...`
- changed `e` and `url` helper to async
- updated tests
2013-12-06 09:51:35 +01:00

47 lines
No EOL
1 KiB
JavaScript

/*globals describe, before, beforeEach, afterEach, it*/
var testUtils = require('../utils'),
should = require('should'),
sinon = require('sinon'),
when = require('when'),
path = require('path'),
_ = require('underscore'),
// Stuff we are testing
config = require('../../server/config'),
Ghost = require('../../ghost');
describe("Ghost API", function () {
var sandbox,
ghost;
before(function (done) {
testUtils.clearData().then(function () {
done();
}, done);
});
beforeEach(function (done) {
sandbox = sinon.sandbox.create();
testUtils.initData().then(function () {
ghost = new Ghost();
done();
}, done);
});
afterEach(function () {
sandbox.restore();
});
after(function (done) {
testUtils.clearData().then(function () {
done();
}, done);
});
it("is a singleton", function () {
var ghost2 = new Ghost();
should.strictEqual(ghost, ghost2);
});
});