1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-11-01 19:07:38 +01:00
unleash.unleash/src/lib/openapi/spec/public-signup-schema.test.ts
andreas-unleash aa589b5ff5
Fix/oas response (#2068)
* 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
2022-09-26 13:06:30 +03:00

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();
});