fix m.route.link and m.route.set history replacement

This commit is contained in:
Leo Horie 2016-12-06 23:29:15 -05:00
parent 08a4442814
commit 992aa30ccc
11 changed files with 113 additions and 203 deletions

View file

@ -14,7 +14,7 @@ o.spec("Router.setPath", function() {
o.beforeEach(function() {
$window = pushStateMock(env)
router = new Router($window)
router.setPrefix(prefix)
router.prefix = prefix
onRouteChange = o.spy()
onFail = o.spy()
})
@ -88,7 +88,7 @@ o.spec("Router.setPath", function() {
$window.location.href = "file://" + prefix + "/test"
router = new Router($window)
router.setPrefix(prefix)
router.prefix = prefix
router.defineRoutes({"/test": {data: 1}, "/other/:a/:b...": {data: 2}}, onRouteChange, onFail)