Permalink
Browse files

add failing test

  • Loading branch information...
1 parent fdb0d10 commit caafc643e96a627a44aa23484d5f5cc549b5dc10 @tj tj committed Jun 26, 2012
Showing with 15 additions and 0 deletions.
  1. +15 −0 test/supertest.js
View
15 test/supertest.js
@@ -37,6 +37,21 @@ describe('request(app)', function(){
});
})
+ it('should work with .send() etc', function(done){
+ var app = express();
+
+ app.use(express.bodyParser());
+
+ app.post('/', function(req, res){
+ res.send(req.body.name);
+ });
+
+ request(app)
+ .post('/')
+ .send({ name: 'tobi' })
+ .expect('tobi', done);
+ })
+
it('should default redirects to 0', function(done){
var app = express();

0 comments on commit caafc64

Please sign in to comment.