mirror of
https://github.com/Unleash/unleash.git
synced 2024-11-01 19:07:38 +01:00
aa589b5ff5
* bug fix * bug fix * remove doc file * store fixes * bug fix * rollback deleted file * fix test * add url to token * return all tokens not just active * add url fix * PR comment * PR comment * PR comment * add the flag to the experimental options * fix env var name
24 lines
757 B
TypeScript
24 lines
757 B
TypeScript
import { validateSchema } from '../validate';
|
|
import { PublicSignupTokenSchema } from './public-signup-token-schema';
|
|
|
|
test('publicSignupTokenSchema', () => {
|
|
const data: PublicSignupTokenSchema = {
|
|
name: 'Default',
|
|
secret: 'some-secret',
|
|
url: 'http://localhost:4242/invite-link/some-secret',
|
|
expiresAt: new Date().toISOString(),
|
|
users: [],
|
|
role: { name: 'Viewer ', type: 'type', id: 1 },
|
|
createdAt: new Date().toISOString(),
|
|
createdBy: 'someone',
|
|
};
|
|
|
|
expect(
|
|
validateSchema('#/components/schemas/publicSignupTokenSchema', {}),
|
|
).not.toBeUndefined();
|
|
|
|
expect(
|
|
validateSchema('#/components/schemas/publicSignupTokenSchema', data),
|
|
).toBeUndefined();
|
|
});
|