Skip to content
Browse files

add another test

  • Loading branch information...
1 parent f033828 commit 0fb64108454c6b7d56dfb2cd7410303548c1b8ee @tj tj committed Jul 2, 2012
Showing with 14 additions and 0 deletions.
  1. +14 −0 test/supertest.js
View
14 test/supertest.js
@@ -101,6 +101,20 @@ describe('request(app)', function(){
});
})
+ it('should assert the response text', function(done){
+ var app = express();
+
+ app.set('json spaces', 0);
+
+ app.get('/', function(req, res){
+ res.send({ foo: 'bar' });
+ });
+
+ request(app)
+ .get('/')
+ .expect('{"foo":"bar"}', done);
+ })
+
it('should support regular expressions', function(done){
var app = express();

0 comments on commit 0fb6410

Please sign in to comment.
Something went wrong with that request. Please try again.