File tree 1 file changed +28
-0
lines changed
1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -995,4 +995,32 @@ describe('miscellaneous', function() {
995
995
} ) ;
996
996
} ) ;
997
997
998
+ it ( 'android login providing empty authData block works' , ( done ) => {
999
+ let headers = {
1000
+ 'Content-Type' : 'application/json' ,
1001
+ 'X-Parse-Application-Id' : 'test' ,
1002
+ 'X-Parse-REST-API-Key' : 'rest'
1003
+ } ;
1004
+ let data = {
1005
+ username : 'pulse1989' ,
1006
+ password : 'password1234' ,
1007
+ authData : { }
1008
+ } ;
1009
+ let requestOptions = {
1010
+ headers : headers ,
1011
+ url : 'http://localhost:8378/1/users' ,
1012
+ body : JSON . stringify ( data )
1013
+ } ;
1014
+ request . post ( requestOptions , ( error , response , body ) => {
1015
+ expect ( error ) . toBe ( null ) ;
1016
+ requestOptions . url = 'http://localhost:8378/1/login' ;
1017
+ request . get ( requestOptions , ( error , response , body ) => {
1018
+ expect ( error ) . toBe ( null ) ;
1019
+ let b = JSON . parse ( body ) ;
1020
+ expect ( typeof b [ 'sessionToken' ] ) . toEqual ( 'string' ) ;
1021
+ done ( ) ;
1022
+ } ) ;
1023
+ } ) ;
1024
+ } ) ;
1025
+
998
1026
} ) ;
You can’t perform that action at this time.
0 commit comments