add integration test

This commit is contained in:
Leo Horie 2016-12-04 23:36:38 -05:00
parent 2ffd2fb7e4
commit a2b45ff131
2 changed files with 24 additions and 1 deletions

View file

@ -609,6 +609,29 @@ o.spec("route", function() {
}, 30)
})
o("route changes activate onbeforeremove", function(done, timeout) {
var spy = o.spy()
$window.location.href = prefix + "/a"
route(root, "/a", {
"/a": {
onbeforeremove: spy,
view: function() {}
},
"/b": {
view: function() {}
}
})
route.set("/b")
setTimeout(function() {
o(spy.callCount).equals(1)
done()
}, 30)
})
o("throttles", function(done, timeout) {
timeout(200)