File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -1012,4 +1012,32 @@ describe('miscellaneous', function() {
1012
1012
} ) ;
1013
1013
} ) ;
1014
1014
1015
+ it ( 'android login providing empty authData block works' , ( done ) => {
1016
+ let headers = {
1017
+ 'Content-Type' : 'application/json' ,
1018
+ 'X-Parse-Application-Id' : 'test' ,
1019
+ 'X-Parse-REST-API-Key' : 'rest'
1020
+ } ;
1021
+ let data = {
1022
+ username : 'pulse1989' ,
1023
+ password : 'password1234' ,
1024
+ authData : { }
1025
+ } ;
1026
+ let requestOptions = {
1027
+ headers : headers ,
1028
+ url : 'http://localhost:8378/1/users' ,
1029
+ body : JSON . stringify ( data )
1030
+ } ;
1031
+ request . post ( requestOptions , ( error , response , body ) => {
1032
+ expect ( error ) . toBe ( null ) ;
1033
+ requestOptions . url = 'http://localhost:8378/1/login' ;
1034
+ request . get ( requestOptions , ( error , response , body ) => {
1035
+ expect ( error ) . toBe ( null ) ;
1036
+ let b = JSON . parse ( body ) ;
1037
+ expect ( typeof b [ 'sessionToken' ] ) . toEqual ( 'string' ) ;
1038
+ done ( ) ;
1039
+ } ) ;
1040
+ } ) ;
1041
+ } ) ;
1042
+
1015
1043
} ) ;
You can’t perform that action at this time.
0 commit comments