Fix cloudron_ghost.json tests

This commit is contained in:
Girish Ramakrishnan
2020-09-23 14:40:45 -07:00
parent 4de2e381ff
commit fb2c5a85b6

View File

@@ -298,7 +298,7 @@ describe('User', function () {
fs.writeFileSync(paths.GHOST_USER_FILE, JSON.stringify(ghost), 'utf8');
users.verify(userObject.id, 'testpassword', users.AP_WEBADMIN, function (error, result) {
fs.unlinkSync(paths.GHOST_USER_FILE);
if (fs.existsSync(paths.GHOST_USER_FILE)) return done(new Error('Ghost file exists after verification'));
expect(error).to.equal(null);
expect(result.id).to.equal(userObject.id);
@@ -316,7 +316,7 @@ describe('User', function () {
fs.writeFileSync(paths.GHOST_USER_FILE, JSON.stringify(ghost), 'utf8');
users.verify(userObject.id, PASSWORD, users.AP_WEBADMIN, function (error, result) {
fs.unlinkSync(paths.GHOST_USER_FILE);
if (fs.existsSync(paths.GHOST_USER_FILE)) return done(new Error('Ghost file exists after verification'));
expect(error).to.not.be.ok();
expect(result).to.be.ok();