@@ -511,6 +511,7 @@ describe('Customs', () => {
511511
512512 action = 'devicesNotify' ;
513513 const uid = 'foo' ;
514+ const email = '[email protected] ' ; 514515
515516 function checkRequestBody ( body ) {
516517 assert . deepEqual (
@@ -540,42 +541,42 @@ describe('Customs', () => {
540541 . reply ( 200 , '{"block":true,"retryAfter":10001}' ) ;
541542
542543 return customsWithUrl
543- . checkAuthenticated ( request , uid , action )
544+ . checkAuthenticated ( request , uid , email , action )
544545 . then ( ( result ) => {
545546 assert . equal (
546547 result ,
547548 undefined ,
548549 'Nothing is returned when /checkAuthenticated succeeds - 1'
549550 ) ;
550- return customsWithUrl . checkAuthenticated ( request , uid , action ) ;
551+ return customsWithUrl . checkAuthenticated ( request , uid , email , action ) ;
551552 } )
552553 . then ( ( result ) => {
553554 assert . equal (
554555 result ,
555556 undefined ,
556557 'Nothing is returned when /checkAuthenticated succeeds - 2'
557558 ) ;
558- return customsWithUrl . checkAuthenticated ( request , uid , action ) ;
559+ return customsWithUrl . checkAuthenticated ( request , uid , email , action ) ;
559560 } )
560561 . then ( ( result ) => {
561562 assert . equal (
562563 result ,
563564 undefined ,
564565 'Nothing is returned when /checkAuthenticated succeeds - 3'
565566 ) ;
566- return customsWithUrl . checkAuthenticated ( request , uid , action ) ;
567+ return customsWithUrl . checkAuthenticated ( request , uid , email , action ) ;
567568 } )
568569 . then ( ( result ) => {
569570 assert . equal (
570571 result ,
571572 undefined ,
572573 'Nothing is returned when /checkAuthenticated succeeds - 4'
573574 ) ;
574- return customsWithUrl . checkAuthenticated ( request , uid , action ) ;
575+ return customsWithUrl . checkAuthenticated ( request , uid , email , action ) ;
575576 } )
576577 . then ( ( ) => {
577578 // request is blocked
578- return customsWithUrl . checkAuthenticated ( request , uid , action ) ;
579+ return customsWithUrl . checkAuthenticated ( request , uid , email , action ) ;
579580 } )
580581 . then (
581582 ( ) => {
@@ -861,7 +862,12 @@ describe('Customs', () => {
861862 } ) ;
862863
863864 try {
864- await customsWithUrl . checkAuthenticated ( request , 'uid' , action ) ;
865+ await customsWithUrl . checkAuthenticated (
866+ request ,
867+ 'uid' ,
868+ 'email' ,
869+ action
870+ ) ;
865871 assert . fail ( 'should have failed' ) ;
866872 } catch ( err ) {
867873 assert . isTrue (
0 commit comments