Permalink
Browse files

Add a test for the broken cookie sessions

darcs-hash:20070312164544-4fc50-8880af2add981b1f917969b0c219384407ce7c1b.gz
  • Loading branch information...
1 parent 9f55836 commit b96eda08979c4e4a003c33d5c23390d680513a29 @chneukirchen committed Mar 12, 2007
Showing with 6 additions and 0 deletions.
  1. +6 −0 test/spec_rack_session_cookie.rb
View
6 test/spec_rack_session_cookie.rb
@@ -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

0 comments on commit b96eda0

Please sign in to comment.