Skip to content

Commit

Permalink
add another test
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Jul 2, 2012
1 parent f033828 commit 0fb6410
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/supertest.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 0fb6410

Please sign in to comment.