Skip to content

Commit

Permalink
Use navigate helper for ampersands-in-path test
Browse files Browse the repository at this point in the history
  • Loading branch information
mislav committed Apr 2, 2015
1 parent bee0762 commit f811710
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions test/unit/pjax.js
Original file line number Diff line number Diff line change
Expand Up @@ -1092,17 +1092,11 @@ if ($.support.pjax) {
})
})

asyncTest("copes with ampersands when pushing urls", function() {
var frame = this.frame

frame.$('#main').on('pjax:success', function() {
asyncTest("copes with ampersands when pushing urls", 2, function() {
navigate(this.frame)
.pjax({ url: "/some-&-path/hello.html", container: "#main" }, function(frame) {
equal(frame.location.pathname, "/some-&-path/hello.html")
equal(frame.location.search, "")
start()
})
frame.$.pjax({
url: "/some-&-path/hello.html",
container: "#main"
})
})
}

0 comments on commit f811710

Please sign in to comment.