Move state enums to the model code
This commit is contained in:
@@ -6,8 +6,7 @@
|
||||
/* global after:false */
|
||||
/* global xit:false */
|
||||
|
||||
var appdb = require('../../appdb.js'),
|
||||
apps = require('../../apps.js'),
|
||||
let apps = require('../../apps.js'),
|
||||
assert = require('assert'),
|
||||
async = require('async'),
|
||||
child_process = require('child_process'),
|
||||
@@ -612,8 +611,8 @@ describe('App installation', function () {
|
||||
.end(function (err, res) {
|
||||
expect(res.statusCode).to.equal(200);
|
||||
|
||||
if (res.body.installationState === appdb.ISTATE_INSTALLED) { appResult = res.body; return done(null); }
|
||||
if (res.body.installationState === appdb.ISTATE_ERROR) return done(new Error('Install error'));
|
||||
if (res.body.installationState === apps.ISTATE_INSTALLED) { appResult = res.body; return done(null); }
|
||||
if (res.body.installationState === apps.ISTATE_ERROR) return done(new Error('Install error'));
|
||||
if (++count > 500) return done(new Error('Timedout'));
|
||||
|
||||
setTimeout(checkInstallStatus, 1000);
|
||||
@@ -902,8 +901,8 @@ describe('App installation', function () {
|
||||
.query({ access_token: token })
|
||||
.end(function (err, res) {
|
||||
expect(res.statusCode).to.equal(200);
|
||||
if (res.body.installationState === appdb.ISTATE_INSTALLED) { appResult = res.body; expect(appResult).to.be.ok(); return done(null); }
|
||||
if (res.body.installationState === appdb.ISTATE_ERROR) return done(new Error('Install error'));
|
||||
if (res.body.installationState === apps.ISTATE_INSTALLED) { appResult = res.body; expect(appResult).to.be.ok(); return done(null); }
|
||||
if (res.body.installationState === apps.ISTATE_ERROR) return done(new Error('Install error'));
|
||||
if (++count > 50) return done(new Error('Timedout'));
|
||||
setTimeout(checkConfigureStatus.bind(null, count, done), 1000);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user