import { HostIdentificationResponseModel, HostIdentificationResponseSchema, } from '@verb/src/libs/stream/host-metadata/versioning/v1/host-identification-metadata-response.model'; import { HostIdentificationSchema } from './host-identification.model'; describe('HostIdentificationModel', () => { describe('#toSchema', () => { it('should build a schema object from the model', () => { const hostIdentificationSchema: HostIdentificationSchema = { email: 'test-email', family_name: 'test-family', given_name: 'test-given', issuer_metadata: {}, nickname: 'test-nick', picture: 'test-pic', sub: 'test-sub', updated_at: 'Mon Sep 28 2020 20:31:03 GMT-0700', }; const hostIdentificationResponseShema: HostIdentificationResponseSchema = { email: 'test-email', family_name: 'test-family', given_name: 'test-given', }; const model = new HostIdentificationResponseModel(hostIdentificationSchema); const newSchema = model.toSchema(); expect(newSchema).toStrictEqual(hostIdentificationResponseShema); }); }); });