Skip to content

Commit

Permalink
jashkenas#2321 -- unicode test
Browse files Browse the repository at this point in the history
  • Loading branch information
jashkenas committed Mar 19, 2013
1 parent ad37b3f commit 0f1b88b
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions test/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,15 @@ $(document).ready(function() {
equal(lastArgs[0], 'news');
});

test("routes (simple, but unicode)", 4, function() {
location.replace('http://example.com#search/тест');
Backbone.history.checkUrl();
equal(router.query, "%D1%82%D0%B5%D1%81%D1%82");
equal(router.page, void 0);
equal(lastRoute, 'search');
equal(lastArgs[0], "%D1%82%D0%B5%D1%81%D1%82");
});

test("routes (two part)", 2, function() {
location.replace('http://example.com#search/nyc/p10');
Backbone.history.checkUrl();
Expand Down Expand Up @@ -534,9 +543,9 @@ $(document).ready(function() {
routes: function() {
return {
home: "root",
index: "index.html",
index: "index.html"
};
},
}
});

var RouterExtended = RouterBase.extend({
Expand Down

0 comments on commit 0f1b88b

Please sign in to comment.