Skip to content

Commit

Permalink
Add a test for the broken cookie sessions
Browse files Browse the repository at this point in the history
darcs-hash:20070312164544-4fc50-8880af2add981b1f917969b0c219384407ce7c1b.gz
  • Loading branch information
leahneukirchen committed Mar 12, 2007
1 parent 9f55836 commit b96eda0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/spec_rack_session_cookie.rb
Expand Up @@ -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.