Actually fix the correct thing in the janitor tests
This commit is contained in:
@@ -19,7 +19,7 @@ describe('janitor', function () {
|
||||
authCode: 'authcode-0',
|
||||
clientId: 'clientid-0',
|
||||
userId: 'userid-0',
|
||||
expiresAt: Date.now() + 5000
|
||||
expiresAt: Date.now() + 60 * 60 * 1000
|
||||
};
|
||||
var AUTHCODE_1 = {
|
||||
authCode: 'authcode-1',
|
||||
@@ -32,22 +32,18 @@ describe('janitor', function () {
|
||||
accessToken: tokendb.generateToken(),
|
||||
identifier: tokendb.PREFIX_USER + '0',
|
||||
clientId: 'clientid-0',
|
||||
expires: Date.now(),
|
||||
expires: Date.now() + 60 * 60 * 1000,
|
||||
scope: '*'
|
||||
};
|
||||
var TOKEN_1 = {
|
||||
accessToken: tokendb.generateToken(),
|
||||
identifier: tokendb.PREFIX_USER + '1',
|
||||
clientId: 'clientid-1',
|
||||
expires: Date.now(),
|
||||
expires: Date.now() - 1000,
|
||||
scope: '*',
|
||||
};
|
||||
|
||||
before(function (done) {
|
||||
// Only now calculate the expiration, otherwise it happens when the test code gets loaded, not when this is executed
|
||||
TOKEN_0.expires = Date.now() + 60 * 60 * 1000;
|
||||
TOKEN_1.expires = Date.now() - 1000;
|
||||
|
||||
async.series([
|
||||
database.initialize,
|
||||
database._clear,
|
||||
|
||||
Reference in New Issue
Block a user