From 0bfcd4ffffb42b0430ddf0a58a56c8361f61a48f Mon Sep 17 00:00:00 2001 From: Arun Agrawal Date: Sat, 25 Feb 2012 17:58:19 +0530 Subject: Checking headers in a better way. as doing here 406ece4729e8fd81f156bcb3fce16e938522466e --- actionpack/test/controller/integration_test.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'actionpack/test/controller') diff --git a/actionpack/test/controller/integration_test.rb b/actionpack/test/controller/integration_test.rb index 1ef0ba08be..ea44e68da1 100644 --- a/actionpack/test/controller/integration_test.rb +++ b/actionpack/test/controller/integration_test.rb @@ -296,10 +296,9 @@ class IntegrationProcessTest < ActionDispatch::IntegrationTest self.cookies['cookie_1'] = "sugar" self.cookies['cookie_2'] = "oatmeal" get '/cookie_monster' - assert headers["Set-Cookie"].include?"path=/" - assert headers["Set-Cookie"].include?"cookie_3=chocolate;" - assert headers["Set-Cookie"].include?"cookie_1=; path=/" - + _headers = headers["Set-Cookie"].split("\n") + assert _headers.include?("cookie_1=; path=/") + assert _headers.include?("cookie_3=chocolate; path=/") assert cookies.to_hash["cookie_1"], "" assert cookies.to_hash["cookie_2"], "oatmeal" assert cookies.to_hash["cookie_3"], "chocolate" -- cgit v1.2.3