11import {
2- getMessagePlan ,
3- updateMessagePlan ,
2+ getRoutingConfig ,
3+ updateRoutingConfig ,
44 getTemplatesByIds ,
55 getMessagePlanTemplates ,
66 getRoutingConfigs ,
@@ -284,7 +284,7 @@ describe('Message plans actions', () => {
284284 clientId : undefined ,
285285 } ) ;
286286
287- await expect ( getMessagePlan ( validRoutingConfigId ) ) . rejects . toThrow (
287+ await expect ( getRoutingConfig ( validRoutingConfigId ) ) . rejects . toThrow (
288288 'Failed to get access token'
289289 ) ;
290290
@@ -294,7 +294,7 @@ describe('Message plans actions', () => {
294294 it ( 'should return the routing config on success' , async ( ) => {
295295 routingConfigApiMock . get . mockResolvedValueOnce ( { data : baseConfig } ) ;
296296
297- const response = await getMessagePlan ( validRoutingConfigId ) ;
297+ const response = await getRoutingConfig ( validRoutingConfigId ) ;
298298
299299 expect ( routingConfigApiMock . get ) . toHaveBeenCalledWith (
300300 'mock-token' ,
@@ -310,7 +310,7 @@ describe('Message plans actions', () => {
310310 } ,
311311 } ) ;
312312
313- const response = await getMessagePlan ( notFoundRoutingConfigId ) ;
313+ const response = await getRoutingConfig ( notFoundRoutingConfigId ) ;
314314
315315 expect ( routingConfigApiMock . get ) . toHaveBeenCalledWith (
316316 'mock-token' ,
@@ -332,7 +332,7 @@ describe('Message plans actions', () => {
332332 data : { ...baseConfig , id : invalidRoutingConfigId } ,
333333 } ) ;
334334
335- const response = await getMessagePlan ( invalidRoutingConfigId ) ;
335+ const response = await getRoutingConfig ( invalidRoutingConfigId ) ;
336336
337337 expect ( routingConfigApiMock . get ) . toHaveBeenCalledWith (
338338 'mock-token' ,
@@ -350,7 +350,7 @@ describe('Message plans actions', () => {
350350 { } as Result < RoutingConfig >
351351 ) ;
352352
353- const response = await getMessagePlan ( validRoutingConfigId ) ;
353+ const response = await getRoutingConfig ( validRoutingConfigId ) ;
354354
355355 expect ( response ) . toBeUndefined ( ) ;
356356 } ) ;
@@ -364,7 +364,7 @@ describe('Message plans actions', () => {
364364 } ) ;
365365
366366 await expect (
367- updateMessagePlan ( validRoutingConfigId , baseConfig )
367+ updateRoutingConfig ( validRoutingConfigId , baseConfig )
368368 ) . rejects . toThrow ( 'Failed to get access token' ) ;
369369
370370 expect ( routingConfigApiMock . update ) . not . toHaveBeenCalled ( ) ;
@@ -379,7 +379,7 @@ describe('Message plans actions', () => {
379379
380380 routingConfigApiMock . update . mockResolvedValueOnce ( { data : updated } ) ;
381381
382- const response = await updateMessagePlan ( validRoutingConfigId , updated ) ;
382+ const response = await updateRoutingConfig ( validRoutingConfigId , updated ) ;
383383
384384 expect ( routingConfigApiMock . update ) . toHaveBeenCalledWith (
385385 'mock-token' ,
@@ -395,7 +395,7 @@ describe('Message plans actions', () => {
395395 { } as Result < RoutingConfig >
396396 ) ;
397397
398- const response = await updateMessagePlan (
398+ const response = await updateRoutingConfig (
399399 validRoutingConfigId ,
400400 baseConfig
401401 ) ;
@@ -410,7 +410,7 @@ describe('Message plans actions', () => {
410410 } ,
411411 } ) ;
412412
413- const response = await updateMessagePlan (
413+ const response = await updateRoutingConfig (
414414 validRoutingConfigId ,
415415 baseConfig
416416 ) ;
@@ -436,7 +436,7 @@ describe('Message plans actions', () => {
436436 data : { ...baseConfig , id : invalidRoutingConfigId } ,
437437 } ) ;
438438
439- const response = await updateMessagePlan (
439+ const response = await updateRoutingConfig (
440440 invalidRoutingConfigId ,
441441 baseConfig
442442 ) ;
0 commit comments