This commit is contained in:
@ -79,6 +79,14 @@ describe ('key store', () => {
|
||||
.toEqual (keys[1].key);
|
||||
});
|
||||
|
||||
it ('should reject key generation of expired keys', () => {
|
||||
const iat = ((new Date)
|
||||
.getTime () / 1000) - 10;
|
||||
const duration = 5;
|
||||
expect (() => ks.get_key (iat, duration))
|
||||
.toThrowError ('cannot create already expired keys');
|
||||
});
|
||||
|
||||
afterAll (() => {
|
||||
jasmine.clock ()
|
||||
.uninstall ();
|
||||
|
Reference in New Issue
Block a user