@@ -4,11 +4,9 @@ import {
44 httpClient ,
55} from '../routing-config-api-client' ;
66import { RoutingConfig , RoutingConfigStatus } from '../types/generated' ;
7- import { ErrorCase } from '../types/error-cases' ;
87
98const validRoutingConfigId = '2a4b6c8d-0e1f-4a2b-9c3d-5e6f7a8b9c0d' ;
109const notFoundRoutingConfigId = '3b5d7f9a-1c2e-4b3d-8f0a-6e7d8c9b0a1f' ;
11- const invalidRoutingConfigId = 'not-a-uuid' ;
1210
1311describe ( 'RoutingConfigurationApiClient' , ( ) => {
1412 const axiosMock = new MockAdapter ( httpClient ) ;
@@ -141,21 +139,6 @@ describe('RoutingConfigurationApiClient', () => {
141139 expect ( axiosMock . history . get . length ) . toBe ( 1 ) ;
142140 } ) ;
143141
144- it ( 'should return error for invalid routing config ID' , async ( ) => {
145- const response = await client . get ( 'mock-token' , invalidRoutingConfigId ) ;
146-
147- expect ( response . error ) . toEqual ( {
148- errorMeta : {
149- code : ErrorCase . VALIDATION_FAILED ,
150- description : 'Invalid routing configuration ID format' ,
151- details : { id : invalidRoutingConfigId } ,
152- } ,
153- actualError : undefined ,
154- } ) ;
155- expect ( response . data ) . toBeUndefined ( ) ;
156- expect ( axiosMock . history . get . length ) . toBe ( 0 ) ;
157- } ) ;
158-
159142 it ( 'should return routing configuration on success' , async ( ) => {
160143 const data = {
161144 id : validRoutingConfigId ,
@@ -294,34 +277,6 @@ describe('RoutingConfigurationApiClient', () => {
294277 expect ( axiosMock . history . patch . length ) . toBe ( 1 ) ;
295278 } ) ;
296279
297- it ( 'should return error for invalid routing config ID' , async ( ) => {
298- const body = {
299- id : invalidRoutingConfigId ,
300- name : 'Test plan' ,
301- campaignId : 'campaign-1' ,
302- cascade : [ ] ,
303- cascadeGroupOverrides : [ ] ,
304- } ;
305-
306- const response = await client . update (
307- 'mock-token' ,
308- invalidRoutingConfigId ,
309- body ,
310- 42
311- ) ;
312-
313- expect ( response . error ) . toEqual ( {
314- errorMeta : {
315- code : ErrorCase . VALIDATION_FAILED ,
316- description : 'Invalid routing configuration ID format' ,
317- details : { id : invalidRoutingConfigId } ,
318- } ,
319- actualError : undefined ,
320- } ) ;
321- expect ( response . data ) . toBeUndefined ( ) ;
322- expect ( axiosMock . history . patch . length ) . toBe ( 0 ) ;
323- } ) ;
324-
325280 it ( 'should return updated routing configuration on success' , async ( ) => {
326281 const body = {
327282 id : validRoutingConfigId ,
0 commit comments