Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

test

  • Loading branch information...
commit 2305e0c7c96f128fc5495d7cabc08f006a84a5a2 1 parent bda7be3
@tj tj authored
Showing with 17 additions and 0 deletions.
  1. +17 −0 test/bodyParser.js
View
17 test/bodyParser.js
@@ -40,4 +40,21 @@ describe('connect.bodyParser()', function(){
done();
});
})
+
+ describe('with multipart/form-data', function(){
+ it('should populate req.body', function(){
+ app.request()
+ .post('/')
+ .set('Content-Type', 'multipart/form-data; boundary=foo')
+ .write('--foo\r\n')
+ .write('Content-Disposition: form-data; name="name"\r\n')
+ .write('\r\n')
+ .write('Tobi')
+ .write('\r\n--foo--')
+ .end(function(res){
+ res.body.should.equal('tobi');
+ done();
+ });
+ })
+ })
})
Please sign in to comment.
Something went wrong with that request. Please try again.