Merge pull request #1493 from bruce-one/back-button-on-default-route-test
Ensure the back button test checks the right thing.
This commit is contained in:
commit
a593131022
1 changed files with 4 additions and 1 deletions
|
|
@ -66,7 +66,9 @@ o.spec("route", function() {
|
||||||
})
|
})
|
||||||
|
|
||||||
o("default route doesn't break back button", function(done) {
|
o("default route doesn't break back button", function(done) {
|
||||||
$window.location.href = "http://google.com"
|
$window.location.href = "http://old.com"
|
||||||
|
$window.location.href = "http://new.com"
|
||||||
|
|
||||||
route(root, "/a", {
|
route(root, "/a", {
|
||||||
"/a" : {
|
"/a" : {
|
||||||
view: function() {
|
view: function() {
|
||||||
|
|
@ -83,6 +85,7 @@ o.spec("route", function() {
|
||||||
$window.history.back()
|
$window.history.back()
|
||||||
|
|
||||||
o($window.location.pathname).equals("/")
|
o($window.location.pathname).equals("/")
|
||||||
|
o($window.location.hostname).equals("old.com")
|
||||||
|
|
||||||
done()
|
done()
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue