mirror of
https://gitlab.com/mobicoop/v3/service/matcher.git
synced 2026-03-16 23:05:50 +00:00
create module
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
import { ArgumentMetadata } from '@nestjs/common';
|
||||
import { UpdateTerritoryRequest } from '../../../modules/territory/domain/dtos/update-territory.request';
|
||||
import { RpcValidationPipe } from '../../pipes/rpc.validation-pipe';
|
||||
|
||||
describe('RpcValidationPipe', () => {
|
||||
it('should not validate request', async () => {
|
||||
const target: RpcValidationPipe = new RpcValidationPipe({
|
||||
whitelist: true,
|
||||
forbidUnknownValues: false,
|
||||
});
|
||||
const metadata: ArgumentMetadata = {
|
||||
type: 'body',
|
||||
metatype: UpdateTerritoryRequest,
|
||||
data: '',
|
||||
};
|
||||
await target
|
||||
.transform(<UpdateTerritoryRequest>{}, metadata)
|
||||
.catch((err) => {
|
||||
expect(err.message).toEqual('Rpc Exception');
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user