Browse files

adding additional router test

  • Loading branch information...
1 parent 83d2918 commit f930b5f042253ab086d36c54011fab5a23cb1e5f @jashkenas jashkenas committed Feb 27, 2012
Showing with 14 additions and 0 deletions.
  1. +14 −0 test/router.js
View
14 test/router.js
@@ -263,4 +263,18 @@ $(document).ready(function() {
equal(router.rest, 'has%20space');
});
+
+ asyncTest("Router: correctly handles URLs with % (#868)", 3, function() {
+ window.location.hash = 'search/fat%3A1.5%25';
+ setTimeout(function() {
+ window.location.hash = 'search/fat';
+ setTimeout(function() {
+ equal(router.query, 'fat');
+ equal(router.page, undefined);
+ equal(lastRoute, 'search');
+ start();
+ }, 50);
+ }, 50);
+ });
+
});

0 comments on commit f930b5f

Please sign in to comment.