@@ -392,7 +392,7 @@ const tests = [
392
392
} ,
393
393
validationFunc : function ( driver , result ) {
394
394
result . type . should . be . equal ( 'resolved' ) ;
395
- JSON . parse ( result . data . data ) . data . should . eql ( 'this is a test string' ) ;
395
+ JSON . parse ( result . data . data ) . data . should . be . equal ( 'this is a test string' ) ;
396
396
}
397
397
} , {
398
398
description : 'should encode spaces in query string (params object) correctly (GET) #71' ,
@@ -402,7 +402,7 @@ const tests = [
402
402
} ,
403
403
validationFunc : function ( driver , result ) {
404
404
result . type . should . be . equal ( 'resolved' ) ;
405
- JSON . parse ( result . data . data ) . args [ 'query param' ] . should . eql ( 'and value with spaces' ) ;
405
+ JSON . parse ( result . data . data ) . args [ 'query param' ] . should . be . equal ( 'and value with spaces' ) ;
406
406
}
407
407
} , {
408
408
description : 'should decode latin1 (iso-8859-1) encoded body correctly (GET) #72' ,
@@ -414,6 +414,16 @@ const tests = [
414
414
result . type . should . be . equal ( 'resolved' ) ;
415
415
result . data . data . should . include ( '[¡] 161 10/01 241 A1 INVERTED EXCLAMATION MARK\n[¢] 162 10/02 242 A2 CENT SIGN' ) ;
416
416
}
417
+ } , {
418
+ description : 'should return empty body string correctly (GET)' ,
419
+ expected : 'resolved: {"status": 200, "data": "" ...' ,
420
+ func : function ( resolve , reject ) {
421
+ cordova . plugin . http . get ( 'http://httpbin.org/stream/0' , { } , { } , resolve , reject ) ;
422
+ } ,
423
+ validationFunc : function ( driver , result ) {
424
+ result . type . should . be . equal ( 'resolved' ) ;
425
+ result . data . data . should . be . equal ( '' ) ;
426
+ }
417
427
}
418
428
] ;
419
429
0 commit comments