Skip to content
Myr

added more route tests

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent 9016b5a · Browse files · 1 file+8 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+8 added−0 removed

  • tests:+8 added−0 removed

1 file+8 added−0 removed

modified:test/router.test.js+8 added
83 unmodified lines
84 app.post('/pin/save/:lat(\\d+.\\d+)/:long(\\d+.\\d+)', function(req, res){85 res.send(req.params.lat + ' ' + req.params.long);86 });8788 app.post('/pin/save2/:lat([0-9]+.[0-9]+)/:long([0-9]+.[0-9]+)', function(req, res){89 res.send(req.params.lat + ' ' + req.params.long);90 });9192 assert.response(app,93 { url: '/pin/save/1.2/3.4', method: 'POST' },94 { body: '1.2 3.4' });9596 assert.response(app,97 { url: '/pin/save2/1.2/3.4', method: 'POST' },98 { body: '1.2 3.4' });99100 assert.response(app,101 { url: '/user/12' },102 { body: 'user 12' });103 104 assert.response(app,
179 unmodified lines