Permalink
Browse files

added vow: cookies should be set for the path they request when that …

…differs from the current path
  • Loading branch information...
1 parent 3df065d commit 093c3cdeef03d89ef27c54108b826b7d6dc45532 @boblail boblail committed Jan 20, 2011
Showing with 2 additions and 0 deletions.
  1. +2 −0 spec/cookie-spec.coffee
View
@@ -86,6 +86,7 @@ vows.describe("Cookies").addBatch(
browser.cookies("localhost", "/cookies/echo").set "_path2", "here"
browser.cookies("localhost", "/jars").set "_path3", "there"
browser.cookies("localhost", "/cookies/fido").set "_path4", "there"
+ browser.cookies("localhost", "/jars").set "_path5", "here", "path": "/cookies"
browser.cookies(".localhost").set "_domain1", "here"
browser.cookies("not.localhost").set "_domain2", "there"
browser.cookies("notlocalhost").set "_domain3", "there"
@@ -102,6 +103,7 @@ vows.describe("Cookies").addBatch(
"should pass path cookies to server": (cookies)->
assert.equal cookies._path1, "here"
assert.equal cookies._path2, "here"
+ "should pass cookies that specified a different path when they were assigned": (cookies)-> assert.equal cookies._path5, "here"
"should not pass unrelated path cookies to server": (cookies)->
assert.isUndefined cookies._path3
assert.isUndefined cookies._path4

0 comments on commit 093c3cd

Please sign in to comment.