@@ -10,13 +10,30 @@ beforeEach(() => {
1010 Tokens . RemoveImpersonationToken ( )
1111} )
1212
13- test ( 'can filter call with boolean' , async ( ) => {
13+ test ( 'can filter call with boolean (true) ' , async ( ) => {
1414 Tokens . SetAccessToken ( validToken )
15- await Me . ListProducts ( { filters : { 'xp.Featued ' : true } } )
15+ await Me . ListProducts ( { filters : { 'xp.Featured ' : true } } )
1616 expect ( mockAxios . get ) . toHaveBeenCalledTimes ( 1 )
1717 expect ( mockAxios . get ) . toHaveBeenCalledWith ( `${ apiUrl } /me/products` , {
1818 params : {
19- filters : { 'xp.Featued' : true } ,
19+ filters : { 'xp.Featured' : true } ,
20+ } ,
21+ paramsSerializer : expect . any ( Function ) ,
22+ timeout : 60000 ,
23+ headers : {
24+ 'Content-Type' : 'application/json' ,
25+ 'Authorization' : `Bearer ${ validToken } ` ,
26+ } ,
27+ } )
28+ } )
29+
30+ test ( 'can filter call with boolean (false)' , async ( ) => {
31+ Tokens . SetAccessToken ( validToken )
32+ await Me . ListProducts ( { filters : { IsSubmitted : false } } )
33+ expect ( mockAxios . get ) . toHaveBeenCalledTimes ( 1 )
34+ expect ( mockAxios . get ) . toHaveBeenCalledWith ( `${ apiUrl } /me/products` , {
35+ params : {
36+ filters : { IsSubmitted : false } ,
2037 } ,
2138 paramsSerializer : expect . any ( Function ) ,
2239 timeout : 60000 ,
0 commit comments