Adding test for hashbang URLs. For pull request #312.

This commit is contained in:
Samuel Clay
2011-04-22 12:15:46 -04:00
2 changed files with 10 additions and 1 deletions

View File

@@ -730,7 +730,7 @@
};
// Cached regex for cleaning hashes.
var hashStrip = /^#*/;
var hashStrip = /^#*!?/;
// Cached regex for detecting MSIE.
var isExplorer = /msie [\w.]+/;

View File

@@ -106,4 +106,13 @@ $(document).ready(function() {
}, 10);
});
asyncTest("Controller: routes (hashbang)", 2, function() {
window.location.hash = '!search/news';
setTimeout(function() {
equals(controller.query, 'news');
equals(controller.page, undefined);
start();
}, 10);
});
});