Permalink
Browse files

clean up test

  • Loading branch information...
1 parent c0d2c4b commit 6f807b3991ea8f33ac04a0d5b955566ce68b4798 @tj tj committed Apr 12, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 test/namespace.test.js
View
@@ -152,23 +152,28 @@ module.exports = {
calledA++;
next();
}
+
function middlewareB(req,res,next){
calledB++;
next();
}
+
app.namespace('/user/:id', middlewareA, function(){
app.get('/', function(req,res){
res.send('got Home');
});
+
app.get('/other', function(req,res){
res.send('got Other');
});
+
app.namespace('/nest', middlewareB, function(req,res){
app.get('/', function(req,res){
res.send('got Nest');
});
});
});
+
var pending = 3;
function finished() {
--pending || function(){
@@ -177,6 +182,7 @@ module.exports = {
done();
}();
}
+
assert.response(app,
{ url: '/user/12' },
{ body: 'got Home' },

0 comments on commit 6f807b3

Please sign in to comment.