Permalink
Browse files

more * tests

  • Loading branch information...
1 parent 4d9ad21 commit e9cd82b72d6d9ea9a145d9cfbd844550b0ace31c TJ Holowaychuk committed May 2, 2012
Showing with 17 additions and 1 deletion.
  1. +17 −1 test/app.router.js
View
@@ -314,7 +314,23 @@ describe('app.router', function(){
.get('/api/users/foo.bar.json')
.expect('users/foo.bar as json', done);
})
-
+
+ it('should work cross-segment', function(done){
+ var app = express();
+
+ app.get('/api*', function(req, res){
+ res.send(req.params[0]);
+ });
+
+ request(app)
+ .get('/api')
+ .expect('', function(){
+ request(app)
+ .get('/api/hey')
+ .expect('/hey', done);
+ });
+ })
+
it('should allow naming', function(done){
var app = express();

0 comments on commit e9cd82b

Please sign in to comment.