Skip to content

Commit

Permalink
parsing cookies with quotes works
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove authored and josh committed Dec 19, 2010
1 parent 5ddd115 commit 59bd279
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/spec_request.rb
Expand Up @@ -330,6 +330,18 @@
req.cookies.should.equal 'foo' => 'bar'
end

should 'parse cookies with quotes' do
req = Rack::Request.new Rack::MockRequest.env_for('', {
'HTTP_COOKIE' => '$Version="1"; Customer="WILE_E_COYOTE"; $Path="/acme"; Part_Number="Rocket_Launcher_0001"; $Path="/acme"'
})
req.cookies.should.equal({
'$Version' => '"1"',
'Customer' => '"WILE_E_COYOTE"',
'$Path' => '"/acme"',
'Part_Number' => '"Rocket_Launcher_0001"',
})
end

should "provide setters" do
req = Rack::Request.new(e=Rack::MockRequest.env_for(""))
req.script_name.should.equal ""
Expand Down

0 comments on commit 59bd279

Please sign in to comment.