Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add failing test

  • Loading branch information...
commit caafc643e96a627a44aa23484d5f5cc549b5dc10 1 parent fdb0d10
TJ Holowaychuk tj authored
Showing with 15 additions and 0 deletions.
  1. +15 −0 test/supertest.js
15 test/supertest.js
View
@@ -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();
Please sign in to comment.
Something went wrong with that request. Please try again.