spec/rack/test/cookie_spec.rb in rack-test-0.5.3 vs spec/rack/test/cookie_spec.rb in rack-test-0.5.4
- old
+ new
@@ -159,9 +159,15 @@
set_cookie ["value=10", "foo=bar"]
get "/cookies/show"
last_request.cookies.should == { "value" => "10", "foo" => "bar" }
end
+ it "skips emtpy string cookies" do
+ set_cookie "value=10\n\nfoo=bar"
+ get "/cookies/show"
+ last_request.cookies.should == { "value" => "10", "foo" => "bar" }
+ end
+
it "parses multiple cookies properly" do
get "/cookies/set-multiple"
get "/cookies/show"
last_request.cookies.should == { "key1" => "value1", "key2" => "value2" }
end