@@ -543,7 +543,7 @@ describe("onCall", () => {
543543 expect ( noClaimResp . status ) . to . equal ( 403 ) ;
544544 } ) ;
545545
546- it ( "should check single claim with default value (true )" , async ( ) => {
546+ it ( "should check single claim with default value (truthy )" , async ( ) => {
547547 const func = https . onCall (
548548 {
549549 authPolicy : https . hasClaim ( "admin" ) ,
@@ -553,12 +553,15 @@ describe("onCall", () => {
553553 const validResp = await runHandler ( func , request ( { auth : { admin : true } } ) ) ;
554554 expect ( validResp . status ) . to . equal ( 200 ) ;
555555
556- const wrongTypeResp = await runHandler ( func , request ( { auth : { admin : "true" } } ) ) ;
557- expect ( wrongTypeResp . status ) . to . equal ( 403 ) ;
556+ const truthyResp = await runHandler ( func , request ( { auth : { admin : "true" } } ) ) ;
557+ expect ( truthyResp . status ) . to . equal ( 200 ) ;
558558
559559 const falseResp = await runHandler ( func , request ( { auth : { admin : false } } ) ) ;
560560 expect ( falseResp . status ) . to . equal ( 403 ) ;
561561
562+ const falseStrResp = await runHandler ( func , request ( { auth : { admin : "false" } } ) ) ;
563+ expect ( falseStrResp . status ) . to . equal ( 403 ) ;
564+
562565 const noClaimResp = await runHandler ( func , request ( { auth : { } } ) ) ;
563566 expect ( noClaimResp . status ) . to . equal ( 403 ) ;
564567 } ) ;
0 commit comments