This commit is contained in:
parent
0feb8e5a16
commit
dc661f298b
|
@ -27,8 +27,10 @@ describe('Renew Token', () => {
|
||||||
jasmine.clock().uninstall();
|
jasmine.clock().uninstall();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should renew process', async() => {
|
it('should renew token', async() => {
|
||||||
jasmine.clock().mockDate(new Date(startingTime + 21600000));
|
const mockDate = new Date(startingTime + 26600000);
|
||||||
|
jasmine.clock().mockDate(mockDate);
|
||||||
|
console.log(startingTime, mockDate)
|
||||||
const {id} = await models.VnUser.renewToken(ctx);
|
const {id} = await models.VnUser.renewToken(ctx);
|
||||||
|
|
||||||
expect(id).not.toEqual(ctx.req.accessToken.id);
|
expect(id).not.toEqual(ctx.req.accessToken.id);
|
||||||
|
|
Loading…
Reference in New Issue