Permalink
Browse files

Write test to confirm case #16

  • Loading branch information...
1 parent 2c741fb commit d6600fe564a322e669ef74c012f416433ed744c4 @1602 committed Jan 24, 2013
Showing with 9 additions and 0 deletions.
  1. +9 −0 test/railway_routes_test.js
@@ -150,3 +150,12 @@ it('should allow to specify url helper name', function (test) {
test.done();
});
+it('should handle question mark after param name', function (test) {
+ var paths = [];
+ var map = new routes.Map(fakeApp(paths), fakeBridge());
+ map.get('/test/:p1?', 'test#test');
+ test.equals(map.pathTo.test(), '/test');
+ test.equals(map.pathTo.test(''), '/test');
+ test.equals(map.pathTo.test('param'), '/test/param');
+ test.done();
+});

0 comments on commit d6600fe

Please sign in to comment.