Merge pull request #3448 from jaswilli/update-check-test

Ghost instance not needed in update check test
This commit is contained in:
Hannah Wolfe 2014-07-30 13:50:02 +01:00
commit 3e194097a5

View File

@ -9,26 +9,14 @@ var testUtils = require('../utils'),
packageInfo = require('../../../package'),
ghost = require('../../../core'),
config = rewire('../../../core/server/config'),
defaultConfig = require('../../../config.example')[process.env.NODE_ENV],
updateCheck = rewire('../../server/update-check');
describe('Update Check', function () {
var environmentsOrig;
before(function (done) {
before(function () {
environmentsOrig = updateCheck.__get__('allowedCheckEnvironments');
updateCheck.__set__('allowedCheckEnvironments', ['development', 'production', 'testing']);
_.extend(config, defaultConfig);
ghost({config: config.paths.config}).then(function () {
return testUtils.clearData();
}).then(function () {
done();
}).catch(function (err) {
console.log('Update Check before error', err);
throw new Error(err);
});
});
after(function () {