Skip to content

Commit

Permalink
added more route tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed May 20, 2011
1 parent 45f168e commit 9016b5a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/router.test.js
Expand Up @@ -81,6 +81,14 @@ module.exports = {
res.send('user ' + req.params.id);
});

app.post('/pin/save/:lat(\\d+.\\d+)/:long(\\d+.\\d+)', function(req, res){
res.send(req.params.lat + ' ' + req.params.long);
});

assert.response(app,
{ url: '/pin/save/1.2/3.4', method: 'POST' },
{ body: '1.2 3.4' });

assert.response(app,
{ url: '/user/12' },
{ body: 'user 12' });
Expand Down

0 comments on commit 9016b5a

Please sign in to comment.