Skip to content

Commit

Permalink
Add test for urls in params.
Browse files Browse the repository at this point in the history
  • Loading branch information
braddunbar committed Jun 5, 2014
1 parent d3032e2 commit 1ed8710
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -882,4 +882,15 @@
strictEqual(Backbone.history.fragment, 'shop/search?keyword=short dress');
});

test('#3175 - Urls in the params', 1, function() {
Backbone.history.stop();
location.replace('http://example.com#login?a=value&backUrl=https%3A%2F%2Fwww.msn.com%2Fidp%2Fidpdemo%3Fspid%3Dspdemo%26target%3Db');
Backbone.history = _.extend(new Backbone.History, {location: location});
var router = new Backbone.Router;
router.route('login', function(params) {
strictEqual(params, 'a=value&backUrl=https%3A%2F%2Fwww.msn.com%2Fidp%2Fidpdemo%3Fspid%3Dspdemo%26target%3Db');
});
Backbone.history.start();
});

})();

0 comments on commit 1ed8710

Please sign in to comment.