aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/routing_test.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2019-01-16 20:12:40 -0500
committerRafael Mendonça França <rafaelmfranca@gmail.com>2019-01-17 16:08:34 -0500
commit1a6a3e06ed7242d9a4ed66e9c3d77035bf1362a1 (patch)
tree040abfe7591fd0290655d85e6ddd503cb0744688 /actionpack/test/dispatch/routing_test.rb
parent46ac5fe69a20d4539a15929fe48293e1809a26b0 (diff)
downloadrails-1a6a3e06ed7242d9a4ed66e9c3d77035bf1362a1.tar.gz
rails-1a6a3e06ed7242d9a4ed66e9c3d77035bf1362a1.tar.bz2
rails-1a6a3e06ed7242d9a4ed66e9c3d77035bf1362a1.zip
Remove secret_token rack env and cookie upgrade code
Now that secret_token was removed all this code is now dead.
Diffstat (limited to 'actionpack/test/dispatch/routing_test.rb')
-rw-r--r--actionpack/test/dispatch/routing_test.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb
index 4dffbd0db1..897d17885e 100644
--- a/actionpack/test/dispatch/routing_test.rb
+++ b/actionpack/test/dispatch/routing_test.rb
@@ -4991,8 +4991,12 @@ end
class FlashRedirectTest < ActionDispatch::IntegrationTest
SessionKey = "_myapp_session"
- Generator = ActiveSupport::LegacyKeyGenerator.new("b3c631c314c0bbca50c1b2843150fe33")
- Rotations = ActiveSupport::Messages::RotationConfiguration.new
+ Generator = ActiveSupport::CachingKeyGenerator.new(
+ ActiveSupport::KeyGenerator.new("b3c631c314c0bbca50c1b2843150fe33", iterations: 1000)
+ )
+ Rotations = ActiveSupport::Messages::RotationConfiguration.new
+ SIGNED_COOKIE_SALT = "signed cookie"
+ ENCRYPTED_SIGNED_COOKIE_SALT = "sigend encrypted cookie"
class KeyGeneratorMiddleware
def initialize(app)
@@ -5002,6 +5006,8 @@ class FlashRedirectTest < ActionDispatch::IntegrationTest
def call(env)
env["action_dispatch.key_generator"] ||= Generator
env["action_dispatch.cookies_rotations"] ||= Rotations
+ env["action_dispatch.signed_cookie_salt"] = SIGNED_COOKIE_SALT
+ env["action_dispatch.encrypted_signed_cookie_salt"] = ENCRYPTED_SIGNED_COOKIE_SALT
@app.call(env)
end