Permalink
Browse files

test

  • Loading branch information...
1 parent bda7be3 commit 2305e0c7c96f128fc5495d7cabc08f006a84a5a2 @tj tj committed Nov 17, 2011
Showing with 17 additions and 0 deletions.
  1. +17 −0 test/bodyParser.js
View
@@ -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();
+ });
+ })
+ })
})

0 comments on commit 2305e0c

Please sign in to comment.