Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Better error message to try to figure out why the CI build is failing

  • Loading branch information...
commit 0706de4301bbf12a4c369bd4776ad58affee9ad4 1 parent 46c12fd
@josh josh authored
Showing with 11 additions and 1 deletion.
  1. +11 −1 actionpack/test/controller/session/cookie_store_test.rb
View
12 actionpack/test/controller/session/cookie_store_test.rb
@@ -209,7 +209,8 @@ def test_session_store_with_expire_after
# 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 @@ def with_test_route_set
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
Please sign in to comment.
Something went wrong with that request. Please try again.