Adapt tests for debouncedAsync.

This commit is contained in:
Pierre-Yves Gerardy 2016-09-02 23:01:40 +02:00
parent 2e6a2ae5d9
commit 879b9d6883
2 changed files with 114 additions and 175 deletions

View file

@ -285,18 +285,14 @@ o.spec("Router.defineRoutes", function() {
})
})
o("replays", function(done) {
o("replays", function() {
$window.location.href = prefix + "/test"
var replay = router.defineRoutes({"/test": {data: 1}}, onRouteChange, onFail)
replay()
callAsync(function() {
o(onRouteChange.callCount).equals(2)
o(onRouteChange.args).deepEquals([{data: 1}, {}, "/test", "/test"])
o(onFail.callCount).equals(0)
done()
})
o(onRouteChange.callCount).equals(2)
o(onRouteChange.args).deepEquals([{data: 1}, {}, "/test", "/test"])
o(onFail.callCount).equals(0)
})
})
})