diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-12-04 23:11:42 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-12-04 23:11:42 -0200 |
commit | 48c703b055a6b287100f3c0fbc18f1294d7c7af4 (patch) | |
tree | 9cd9e7da96ae9877a2013d1667d373c5dc2df0e6 /railties/test/application | |
parent | d3d84988674dde77236d04181b48468765ed56c8 (diff) | |
download | rails-48c703b055a6b287100f3c0fbc18f1294d7c7af4.tar.gz rails-48c703b055a6b287100f3c0fbc18f1294d7c7af4.tar.bz2 rails-48c703b055a6b287100f3c0fbc18f1294d7c7af4.zip |
Make salt argument required for message verifier
Diffstat (limited to 'railties/test/application')
-rw-r--r-- | railties/test/application/configuration_test.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index 585d52d258..722c940d8e 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -274,11 +274,11 @@ module ApplicationTests app.config.session_store :disabled end - message = app.message_verifier.generate("some_value") + message = app.message_verifier('salt').generate("some_value") - assert_equal 'some_value', Rails.application.message_verifier.verify(message) + assert_equal 'some_value', Rails.application.message_verifier('salt').verify(message) - secret = app.key_generator.generate_key('default') + secret = app.key_generator.generate_key('salt') verifier = ActiveSupport::MessageVerifier.new(secret) assert_equal 'some_value', verifier.verify(message) end @@ -289,7 +289,7 @@ module ApplicationTests app.config.session_store :disabled end - default_verifier = app.message_verifier + default_verifier = app.message_verifier('salt') text_verifier = app.message_verifier('text') message = text_verifier.generate('some_value') @@ -299,7 +299,7 @@ module ApplicationTests default_verifier.verify(message) end - assert_equal default_verifier.object_id, app.message_verifier.object_id + assert_equal default_verifier.object_id, app.message_verifier('salt').object_id assert_not_equal default_verifier.object_id, text_verifier.object_id end |