diff options
author | Rafael Mendonça França <rafael.franca@plataformatec.com.br> | 2014-11-10 20:38:46 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafael.franca@plataformatec.com.br> | 2014-11-10 20:38:46 -0200 |
commit | 091652cae8465711de3c12697a93c67a9f94576c (patch) | |
tree | 545a299c44c0cd034dae0d038005276bad4a4499 /railties/test/application/middleware | |
parent | 82e20030d4dc022c3a25ecc82315bda553a8659d (diff) | |
parent | db5f1a46f26ed2b8359d3dde3398dd1a8ca443d4 (diff) | |
download | rails-091652cae8465711de3c12697a93c67a9f94576c.tar.gz rails-091652cae8465711de3c12697a93c67a9f94576c.tar.bz2 rails-091652cae8465711de3c12697a93c67a9f94576c.zip |
Merge pull request #16535 from bf4/patch-1
Allow fallback to LegacyKeyGenerator when secret_key_base is not set but secrets.secret_token is
Diffstat (limited to 'railties/test/application/middleware')
-rw-r--r-- | railties/test/application/middleware/session_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/railties/test/application/middleware/session_test.rb b/railties/test/application/middleware/session_test.rb index 31a64c2f5a..eb7885e5b1 100644 --- a/railties/test/application/middleware/session_test.rb +++ b/railties/test/application/middleware/session_test.rb @@ -203,7 +203,7 @@ module ApplicationTests RUBY add_to_config <<-RUBY - config.secret_token = "3b7cd727ee24e8444053437c36cc66c4" + secrets.secret_token = "3b7cd727ee24e8444053437c36cc66c4" RUBY require "#{app_path}/config/environment" @@ -258,7 +258,7 @@ module ApplicationTests RUBY add_to_config <<-RUBY - config.secret_token = "3b7cd727ee24e8444053437c36cc66c4" + secrets.secret_token = "3b7cd727ee24e8444053437c36cc66c4" RUBY require "#{app_path}/config/environment" @@ -317,7 +317,7 @@ module ApplicationTests RUBY add_to_config <<-RUBY - config.secret_token = "3b7cd727ee24e8444053437c36cc66c4" + secrets.secret_token = "3b7cd727ee24e8444053437c36cc66c4" secrets.secret_key_base = nil RUBY @@ -334,7 +334,7 @@ module ApplicationTests get '/foo/read_signed_cookie' assert_equal '2', last_response.body - verifier = ActiveSupport::MessageVerifier.new(app.config.secret_token) + verifier = ActiveSupport::MessageVerifier.new(app.secrets.secret_token) get '/foo/read_raw_cookie' assert_equal 2, verifier.verify(last_response.body)['foo'] |