mirror of
https://github.com/jashkenas/backbone.git
synced 2026-01-23 22:08:04 -05:00
Adding test for hashbang URLs. For pull request #312.
This commit is contained in:
@@ -730,7 +730,7 @@
|
||||
};
|
||||
|
||||
// Cached regex for cleaning hashes.
|
||||
var hashStrip = /^#*/;
|
||||
var hashStrip = /^#*!?/;
|
||||
|
||||
// Cached regex for detecting MSIE.
|
||||
var isExplorer = /msie [\w.]+/;
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user