From 7c6bf016f697837efc8aa1d14bc261f9acc9c3af Mon Sep 17 00:00:00 2001 From: sbriat Date: Thu, 4 May 2023 12:10:08 +0200 Subject: [PATCH] fix rpc validation tests --- src/utils/tests/unit/rpc-validation-pipe.usecase.spec.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/tests/unit/rpc-validation-pipe.usecase.spec.ts b/src/utils/tests/unit/rpc-validation-pipe.usecase.spec.ts index b00bf86..5b47172 100644 --- a/src/utils/tests/unit/rpc-validation-pipe.usecase.spec.ts +++ b/src/utils/tests/unit/rpc-validation-pipe.usecase.spec.ts @@ -1,6 +1,6 @@ import { ArgumentMetadata } from '@nestjs/common'; -import { UpdateUserRequest } from '../../../modules/user/domain/dtos/update-user.request'; import { RpcValidationPipe } from '../../pipes/rpc.validation-pipe'; +import { FindAdByUuidRequest } from '../../../modules/ad/domain/dtos/find-ad-by-uuid.request'; describe('RpcValidationPipe', () => { it('should not validate request', async () => { @@ -10,10 +10,10 @@ describe('RpcValidationPipe', () => { }); const metadata: ArgumentMetadata = { type: 'body', - metatype: UpdateUserRequest, + metatype: FindAdByUuidRequest, data: '', }; - await target.transform({}, metadata).catch((err) => { + await target.transform({}, metadata).catch((err) => { expect(err.message).toEqual('Rpc Exception'); }); });