File tree Expand file tree Collapse file tree 2 files changed +9
-14
lines changed
Expand file tree Collapse file tree 2 files changed +9
-14
lines changed Original file line number Diff line number Diff line change @@ -143,11 +143,8 @@ export default class Client {
143143 return this . post ( URL . userRichMenu ( userId , richMenuId ) ) ;
144144 }
145145
146- public unlinkRichMenuFromUser (
147- userId : string ,
148- richMenuId : string ,
149- ) : Promise < any > {
150- return this . delete ( URL . userRichMenu ( userId , richMenuId ) ) ;
146+ public unlinkRichMenuFromUser ( userId : string ) : Promise < any > {
147+ return this . delete ( URL . userRichMenu ( userId ) ) ;
151148 }
152149
153150 public getRichMenuImage ( richMenuId : string ) : Promise < Readable > {
Original file line number Diff line number Diff line change @@ -248,15 +248,13 @@ describe("client", () => {
248248 } ) ;
249249
250250 it ( "unlinkRichMenuFromUser" , ( ) => {
251- return client
252- . unlinkRichMenuFromUser ( "test_user_id" , "test_rich_menu_id" )
253- . then ( ( res : any ) => {
254- const req = getRecentReq ( ) ;
255- equal ( req . headers . authorization , "Bearer test_channel_access_token" ) ;
256- equal ( req . path , "/user/test_user_id/richmenu/test_rich_menu_id" ) ;
257- equal ( req . method , "DELETE" ) ;
258- deepEqual ( res , { } ) ;
259- } ) ;
251+ return client . unlinkRichMenuFromUser ( "test_user_id" ) . then ( ( res : any ) => {
252+ const req = getRecentReq ( ) ;
253+ equal ( req . headers . authorization , "Bearer test_channel_access_token" ) ;
254+ equal ( req . path , "/user/test_user_id/richmenu" ) ;
255+ equal ( req . method , "DELETE" ) ;
256+ deepEqual ( res , { } ) ;
257+ } ) ;
260258 } ) ;
261259
262260 it ( "setRichMenuImage" , ( ) => {
You can’t perform that action at this time.
0 commit comments