@@ -46,7 +46,7 @@ describe('parsing', function(){
46
46
47
47
needle . get ( 'localhost:' + port , function ( err , response , body ) {
48
48
should . not . exist ( err ) ;
49
- body . should . be . an . instanceof ( Buffer )
49
+ body . should . be . an . instanceof ( String )
50
50
body . toString ( ) . should . eql ( '{"foo":"bar"}' ) ;
51
51
52
52
needle . defaults ( { parse_response : 'all' } ) ;
@@ -141,7 +141,7 @@ describe('parsing', function(){
141
141
it ( 'does NOT return object' , function ( done ) {
142
142
needle . get ( 'localhost:' + port , { parse : false } , function ( err , response , body ) {
143
143
should . not . exist ( err ) ;
144
- body . should . be . an . instanceof ( Buffer )
144
+ body . should . be . an . instanceof ( String )
145
145
body . toString ( ) . should . eql ( '{"foo":"bar"}' ) ;
146
146
done ( ) ;
147
147
} )
@@ -162,7 +162,7 @@ describe('parsing', function(){
162
162
it ( 'does NOT return object' , function ( done ) {
163
163
needle . get ( 'localhost:' + port , { parse : 'xml' } , function ( err , response , body ) {
164
164
should . not . exist ( err ) ;
165
- body . should . be . an . instanceof ( Buffer )
165
+ body . should . be . an . instanceof ( String )
166
166
body . toString ( ) . should . eql ( '{"foo":"bar"}' ) ;
167
167
done ( ) ;
168
168
} )
@@ -281,7 +281,7 @@ describe('parsing', function(){
281
281
it ( 'does NOT return object' , function ( done ) {
282
282
needle . get ( 'localhost:' + port , { parse : false } , function ( err , response , body ) {
283
283
should . not . exist ( err ) ;
284
- body . should . be . an . instanceof ( Buffer )
284
+ body . should . be . an . instanceof ( String )
285
285
body . toString ( ) . should . eql ( 'false' ) ;
286
286
done ( ) ;
287
287
} )
@@ -294,7 +294,7 @@ describe('parsing', function(){
294
294
it ( 'does NOT return object' , function ( done ) {
295
295
needle . get ( 'localhost:' + port , { parse : 'xml' } , function ( err , response , body ) {
296
296
should . not . exist ( err ) ;
297
- body . should . be . an . instanceof ( Buffer )
297
+ body . should . be . an . instanceof ( String )
298
298
body . toString ( ) . should . eql ( 'false' ) ;
299
299
done ( ) ;
300
300
} )
0 commit comments