diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-03-15 23:41:47 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-03-15 23:41:47 -0500 |
commit | 0706de4301bbf12a4c369bd4776ad58affee9ad4 (patch) | |
tree | c415d23921c3cb59d9359a09d46892c387193e8f | |
parent | 46c12fdcb6fb11ae62786eeafd0d1784343b3daa (diff) | |
download | rails-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.rb | 12 |
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 |