aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2009-03-15 23:41:47 -0500
committerJoshua Peek <josh@joshpeek.com>2009-03-15 23:41:47 -0500
commit0706de4301bbf12a4c369bd4776ad58affee9ad4 (patch)
treec415d23921c3cb59d9359a09d46892c387193e8f
parent46c12fdcb6fb11ae62786eeafd0d1784343b3daa (diff)
downloadrails-0706de4301bbf12a4c369bd4776ad58affee9ad4.tar.gz
rails-0706de4301bbf12a4c369bd4776ad58affee9ad4.tar.bz2
rails-0706de4301bbf12a4c369bd4776ad58affee9ad4.zip
Better error message to try to figure out why the CI build is failing
-rw-r--r--actionpack/test/controller/session/cookie_store_test.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/actionpack/test/controller/session/cookie_store_test.rb b/actionpack/test/controller/session/cookie_store_test.rb
index c406188972..48a961ca34 100644
--- a/actionpack/test/controller/session/cookie_store_test.rb
+++ b/actionpack/test/controller/session/cookie_store_test.rb
@@ -209,7 +209,8 @@ class CookieStoreTest < ActionController::IntegrationTest
# expires header should not be changed
get '/no_session_access'
assert_response :success
- assert_equal cookie, headers['Set-Cookie']
+ assert_equal cookie, headers['Set-Cookie'],
+ "#{unmarshal_session(cookie).inspect} expected but was #{unmarshal_session(headers['Set-Cookie']).inspect}"
end
end
@@ -224,4 +225,13 @@ class CookieStoreTest < ActionController::IntegrationTest
yield
end
end
+
+ def unmarshal_session(cookie_string)
+ session = Rack::Utils.parse_query(cookie_string, ';,').inject({}) {|h,(k,v)|
+ h[k] = Array === v ? v.first : v
+ h
+ }[SessionKey]
+ verifier = ActiveSupport::MessageVerifier.new(SessionSecret, 'SHA1')
+ verifier.verify(session)
+ end
end