spec/rack/test/cookie_spec.rb in rack-test-0.5.0 vs spec/rack/test/cookie_spec.rb in rack-test-0.5.1
- old
+ new
@@ -23,9 +23,15 @@
Time.stub!(:now => now + 60)
get "/cookies/show"
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"
last_request.cookies.should == {}
end