Skip to content
Myr

Added another route middleware test

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 3e0da53 · Browse files · 1 file+6 added−2 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+6 added−2 removed

  • tests:+6 added−2 removed

1 file+6 added−2 removed

modified:test/express.test.js+6 added-2 removed
353 unmodified lines
354355 app.get('/booze', [allow('member')], restrictAge(18), function(req, res){356 res.send(200);357 });358 359 ['xxx', 'booze'].forEach(function(thing){358359 app.get('/tobi', [allow('member')], [restrictAge(18)], function(req, res){360 res.send(200);361 });362363 ['xxx', 'booze', 'tobi'].forEach(function(thing){364 assert.response(app,365 { url: '/' + thing },366 { body: 'Unauthorized', status: 401 });367 assert.response(app,
8 unmodified lines