Skip to content

Commit

Permalink
Clarify cookie jar test
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy committed Mar 4, 2010
1 parent 7c78559 commit 5e3e5ac
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions actionpack/test/controller/integration_test.rb
Expand Up @@ -284,18 +284,13 @@ def test_post
end end
end end


def test_cookie_monster test 'response cookies are added to the cookie jar for the next request' do
with_test_route_set do with_test_route_set do
self.cookies['cookie_1'] = "sugar" self.cookies['cookie_1'] = "sugar"
self.cookies['cookie_2'] = "oatmeal" self.cookies['cookie_2'] = "oatmeal"
get '/cookie_monster' get '/cookie_monster'
assert_equal 410, status
assert_equal "Gone", status_message
assert_response 410
assert_response :gone
assert_equal "cookie_1=; path=/\ncookie_3=chocolate; path=/", headers["Set-Cookie"] assert_equal "cookie_1=; path=/\ncookie_3=chocolate; path=/", headers["Set-Cookie"]
assert_equal({"cookie_1"=>"", "cookie_2"=>"oatmeal", "cookie_3"=>"chocolate"}, cookies.to_hash) assert_equal({"cookie_1"=>"", "cookie_2"=>"oatmeal", "cookie_3"=>"chocolate"}, cookies.to_hash)
assert_equal "Gone", response.body
end end
end end


Expand Down

1 comment on commit 5e3e5ac

@josh
Copy link
Contributor

@josh josh commented on 5e3e5ac Mar 5, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Om Nom nom nom

Please sign in to comment.