Skip to content
Myr

added route Collection 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 80e9ffb · Browse files · 1 file+14 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+14 added−0 removed

  • tests:+14 added−0 removed

1 file+14 added−0 removed

modified:test/router.test.js+14 added
289 unmodified lines
290 app.match.get('/').should.have.be.empty;291 app.match.all('/user/123').should.have.length(3);292 app.match('/user/123').should.have.length(3);293 },294295 'test Collection': function(){296 var app = express.createServer();297 app.get('/user', function(){});298 app.get('/user/:id', function(){});299 app.get('/user/:id/:op?', function(){});300 app.put('/user/:id', function(){});301 app.get('/user/:id/edit', function(){});302303 var ret = app.match.all('/user/12').remove();304 ret.should.have.length(3);305 app.match.all('/user/12').should.have.length(0);306 app.get('/user/:id').should.have.length(0);307 },308 309 'test "case sensitive routes" setting': function(){310 var app = express.createServer();311
19 unmodified lines