Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add a test for the broken cookie sessions

darcs-hash:20070312164544-4fc50-8880af2add981b1f917969b0c219384407ce7c1b.gz
  • Loading branch information...
commit b96eda08979c4e4a003c33d5c23390d680513a29 1 parent 9f55836
Christian Neukirchen authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 test/spec_rack_session_cookie.rb
6 test/spec_rack_session_cookie.rb
View
@@ -28,4 +28,10 @@
get("/", "HTTP_COOKIE" => cookie)
res.body.should.equal '{"counter"=>3}'
end
+
+ specify "survives broken cookies" do
+ res = Rack::MockRequest.new(Rack::Session::Cookie.new(incrementor)).
+ get("/", "HTTP_COOKIE" => "rack.session=blarghfasel")
+ res.body.should.equal '{"counter"=>1}'
+ end
end
Please sign in to comment.
Something went wrong with that request. Please try again.