@@ -606,112 +606,6 @@ describe("MessagingApiClient", () => {
606606 server . close ( ) ;
607607 } ) ;
608608
609- it ( "getAdPhoneMessageStatisticsWithHttpInfo" , async ( ) => {
610- let requestCount = 0 ;
611-
612- const server = createServer ( ( req , res ) => {
613- requestCount ++ ;
614-
615- equal ( req . method , "GET" ) ;
616- const reqUrl = new URL ( req . url , "http://localhost/" ) ;
617- equal (
618- reqUrl . pathname ,
619- "/v2/bot/message/delivery/ad_phone" . replace ( "{date}" , "DUMMY" ) , // string
620- ) ;
621-
622- // Query parameters
623- const queryParams = new URLSearchParams ( reqUrl . search ) ;
624- equal (
625- queryParams . get ( "date" ) ,
626- String (
627- // date: string
628- "DUMMY" as unknown as string , // paramName=date(enum)
629- ) ,
630- ) ;
631-
632- equal ( req . headers [ "authorization" ] , `Bearer ${ channel_access_token } ` ) ;
633- equal ( req . headers [ "user-agent" ] , "@line/bot-sdk/1.0.0-test" ) ;
634-
635- res . writeHead ( 200 , { "Content-Type" : "application/json" } ) ;
636- res . end ( JSON . stringify ( { } ) ) ;
637- } ) ;
638- await new Promise ( resolve => {
639- server . listen ( 0 ) ;
640- server . on ( "listening" , resolve ) ;
641- } ) ;
642-
643- const serverAddress = server . address ( ) ;
644- if ( typeof serverAddress === "string" || serverAddress === null ) {
645- throw new Error ( "Unexpected server address: " + serverAddress ) ;
646- }
647-
648- const client = new MessagingApiClient ( {
649- channelAccessToken : channel_access_token ,
650- baseURL : `http://localhost:${ String ( serverAddress . port ) } /` ,
651- } ) ;
652-
653- const res = await client . getAdPhoneMessageStatisticsWithHttpInfo (
654- // date: string
655- "DUMMY" as unknown as string , // paramName=date(enum)
656- ) ;
657-
658- equal ( requestCount , 1 ) ;
659- server . close ( ) ;
660- } ) ;
661-
662- it ( "getAdPhoneMessageStatistics" , async ( ) => {
663- let requestCount = 0 ;
664-
665- const server = createServer ( ( req , res ) => {
666- requestCount ++ ;
667-
668- equal ( req . method , "GET" ) ;
669- const reqUrl = new URL ( req . url , "http://localhost/" ) ;
670- equal (
671- reqUrl . pathname ,
672- "/v2/bot/message/delivery/ad_phone" . replace ( "{date}" , "DUMMY" ) , // string
673- ) ;
674-
675- // Query parameters
676- const queryParams = new URLSearchParams ( reqUrl . search ) ;
677- equal (
678- queryParams . get ( "date" ) ,
679- String (
680- // date: string
681- "DUMMY" as unknown as string , // paramName=date(enum)
682- ) ,
683- ) ;
684-
685- equal ( req . headers [ "authorization" ] , `Bearer ${ channel_access_token } ` ) ;
686- equal ( req . headers [ "user-agent" ] , "@line/bot-sdk/1.0.0-test" ) ;
687-
688- res . writeHead ( 200 , { "Content-Type" : "application/json" } ) ;
689- res . end ( JSON . stringify ( { } ) ) ;
690- } ) ;
691- await new Promise ( resolve => {
692- server . listen ( 0 ) ;
693- server . on ( "listening" , resolve ) ;
694- } ) ;
695-
696- const serverAddress = server . address ( ) ;
697- if ( typeof serverAddress === "string" || serverAddress === null ) {
698- throw new Error ( "Unexpected server address: " + serverAddress ) ;
699- }
700-
701- const client = new MessagingApiClient ( {
702- channelAccessToken : channel_access_token ,
703- baseURL : `http://localhost:${ String ( serverAddress . port ) } /` ,
704- } ) ;
705-
706- const res = await client . getAdPhoneMessageStatistics (
707- // date: string
708- "DUMMY" as unknown as string , // paramName=date(enum)
709- ) ;
710-
711- equal ( requestCount , 1 ) ;
712- server . close ( ) ;
713- } ) ;
714-
715609 it ( "getAggregationUnitNameListWithHttpInfo" , async ( ) => {
716610 let requestCount = 0 ;
717611
0 commit comments