Skip to content
Myr

added test for route specific middleware regression

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 e9ef3dd · Browse files · 1 file+26 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+26 added−0 removed

  • tests:+26 added−0 removed

1 file+26 added−0 removed

modified:test/express.test.js+26 added
433 unmodified lines
434 assert.response(app,435 { url: '/' },436 { body: 'restored' }437 );438 },439 440 'test routes with same callback': function(){441 function handle(req, res) {442 res.send('got ' + req.string);443 }444445 var app = express.createServer();446447 app.get('/', function(req, res, next){448 req.string = '/';449 next();450 }, handle);451452 app.get('/another', function(req, res, next){453 req.string = '/another';454 next();455 }, handle);456457 assert.response(app,458 { url: '/' },459 { body: 'got /' });460461 assert.response(app,462 { url: '/another' },463 { body: 'got /another' });464 }465};