0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

Ghost instance not needed in update check test

Refs #3424, Refs #3444
- API and test suite refactoring triggered a conflict with
  the way update_check_spec.js was written.  Using a running
  copy of Ghost is no longer needed in those tests so it
  was removed.
This commit is contained in:
Jason Williams 2014-07-29 22:29:13 +00:00
parent e4134ccad7
commit a4fe341c2f

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 () {