Browse files

Add spec for escaping cookie values

  • Loading branch information...
1 parent a49ac45 commit 118eeb49073b481472e816c9c18fc547a4c2155a @brynary brynary committed Oct 27, 2009
Showing with 6 additions and 0 deletions.
  1. +6 −0 spec/rack/test/cookie_spec.rb
View
6 spec/rack/test/cookie_spec.rb
@@ -25,6 +25,12 @@ def have_body(string)
last_request.cookies.should == {}
end
+ it "escapes cookie values" do
+ jar = Rack::Test::CookieJar.new
+ jar["value"] = "foo;abc"
+ jar["value"].should == "foo;abc"
+ end
+
it "doesn't send cookies with the wrong domain" do
get "http://www.example.com/cookies/set", "value" => "1"
get "http://www.other.example/cookies/show"

0 comments on commit 118eeb4

Please sign in to comment.