aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/flash_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/controller/flash_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/controller/flash_test.rb')
-rw-r--r--actionpack/test/controller/flash_test.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/actionpack/test/controller/flash_test.rb b/actionpack/test/controller/flash_test.rb
index 409a4ec2e6..bf95c633e5 100644
--- a/actionpack/test/controller/flash_test.rb
+++ b/actionpack/test/controller/flash_test.rb
@@ -242,8 +242,11 @@ end
class FlashIntegrationTest < 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"
class TestController < ActionController::Base
add_flash_types :bar
@@ -365,6 +368,7 @@ class FlashIntegrationTest < ActionDispatch::IntegrationTest
args[0][:env] ||= {}
args[0][:env]["action_dispatch.key_generator"] ||= Generator
args[0][:env]["action_dispatch.cookies_rotations"] = Rotations
+ args[0][:env]["action_dispatch.signed_cookie_salt"] = SIGNED_COOKIE_SALT
super(path, *args)
end