aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/session
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2012-10-31 01:06:46 -0200
committerSantiago Pastorino <santiago@wyeworks.com>2012-11-03 14:57:53 -0200
commit60609bb50d5b99d78a01a945a539cccd061cd7e7 (patch)
tree22bffef099ab1f5ef1eb7b1ac4a97c7f2b6c49ee /actionpack/test/dispatch/session
parentfa0aebf320995a598c5bffda729aed4429681f3a (diff)
downloadrails-60609bb50d5b99d78a01a945a539cccd061cd7e7.tar.gz
rails-60609bb50d5b99d78a01a945a539cccd061cd7e7.tar.bz2
rails-60609bb50d5b99d78a01a945a539cccd061cd7e7.zip
Sign cookies using key deriver
Diffstat (limited to 'actionpack/test/dispatch/session')
-rw-r--r--actionpack/test/dispatch/session/cookie_store_test.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/actionpack/test/dispatch/session/cookie_store_test.rb b/actionpack/test/dispatch/session/cookie_store_test.rb
index 41fa036a92..1677dee524 100644
--- a/actionpack/test/dispatch/session/cookie_store_test.rb
+++ b/actionpack/test/dispatch/session/cookie_store_test.rb
@@ -1,9 +1,12 @@
require 'abstract_unit'
require 'stringio'
+# FIXME remove DummyKeyGenerator and this require in 4.1
+require 'active_support/key_generator'
class CookieStoreTest < ActionDispatch::IntegrationTest
SessionKey = '_myapp_session'
SessionSecret = 'b3c631c314c0bbca50c1b2843150fe33'
+ Generator = ActiveSupport::DummyKeyGenerator.new(SessionSecret)
Verifier = ActiveSupport::MessageVerifier.new(SessionSecret, :digest => 'SHA1')
SignedBar = Verifier.generate(:foo => "bar", :session_id => SecureRandom.hex(16))
@@ -330,7 +333,7 @@ class CookieStoreTest < ActionDispatch::IntegrationTest
# Overwrite get to send SessionSecret in env hash
def get(path, parameters = nil, env = {})
- env["action_dispatch.secret_token"] ||= SessionSecret
+ env["action_dispatch.key_generator"] ||= Generator
super
end