Add test for #1276

This commit is contained in:
Pierre-Yves Gerardy 2016-09-02 22:00:59 +02:00
parent 09578197a1
commit 419897f72c

View file

@ -553,6 +553,26 @@ o.spec("route", function() {
}, FRAME_BUDGET)
})
o("m.route.get() returns the last fully resolved route (#1276)", function(done){
$window.location.href = prefix + "/"
route(root, "/", {
"/": {view: function(){}},
"/2": {onmatch: function(){}}
})
setTimeout(function() {
o(route.get()).equals("/")
route.set("/2")
o(route.get()).equals("/")
done()
}, FRAME_BUDGET)
})
o("routing with RouteResolver works more than once (#1286)", function(done, timeout){
timeout(FRAME_BUDGET * 4)