From 419897f72c7d49cd6a98af7af9afa9812ca13995 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Gerardy Date: Fri, 2 Sep 2016 22:00:59 +0200 Subject: [PATCH] Add test for #1276 --- api/tests/test-router.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/api/tests/test-router.js b/api/tests/test-router.js index d3829bb5..85f977e6 100644 --- a/api/tests/test-router.js +++ b/api/tests/test-router.js @@ -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)