Fix cloudron_ghost.json tests
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user