diff --git a/src/modules/person/api/person.uc.spec.ts b/src/modules/person/api/person.uc.spec.ts index 4be14b706..9eed4dd87 100644 --- a/src/modules/person/api/person.uc.spec.ts +++ b/src/modules/person/api/person.uc.spec.ts @@ -193,7 +193,7 @@ describe('PersonUc', () => { const result: Paged = await personUc.findAll(personDTO); expect(personenkontextServiceMock.findAllPersonenkontexte).toHaveBeenCalledTimes(2); - expect(result).toHaveLength(2); + expect(result.items).toHaveLength(2); expect(result.items.at(0)?.person.name.vorname).toEqual(firstPerson.firstName); expect(result.items.at(0)?.person.name.familienname).toEqual(firstPerson.lastName); expect(result.items.at(1)?.person.name.vorname).toEqual(secondPerson.firstName); diff --git a/src/modules/person/api/personen-query.param.spec.ts b/src/modules/person/api/personen-query.param.spec.ts index 65659e4d5..678ac6e7b 100644 --- a/src/modules/person/api/personen-query.param.spec.ts +++ b/src/modules/person/api/personen-query.param.spec.ts @@ -1,10 +1,10 @@ import { plainToInstance } from 'class-transformer'; import 'reflect-metadata'; -import { PersonenQueryParam, SichtfreigabeType } from './personen-query.param.js'; +import { PersonenQueryParams, SichtfreigabeType } from './personen-query.param.js'; import { faker } from '@faker-js/faker'; describe('PersonenQueryParam', () => { - const referenceParams: PersonenQueryParam = { + const referenceParams: PersonenQueryParams = { sichtfreigabe: SichtfreigabeType.JA, familienname: faker.person.lastName(), referrer: 'referrer', @@ -18,8 +18,9 @@ describe('PersonenQueryParam', () => { referrer: referenceParams.referrer, vorname: referenceParams.vorname, }; - const mappedParams: PersonenQueryParam = plainToInstance(PersonenQueryParam, incomingParams, {}); - expect(mappedParams).toBeInstanceOf(PersonenQueryParam); + const mappedParams: PersonenQueryParams = plainToInstance(PersonenQueryParams, incomingParams, {}); + + expect(mappedParams).toBeInstanceOf(PersonenQueryParams); expect(mappedParams).toEqual(referenceParams); }); });