diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-12-19 17:04:07 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-12-19 17:06:40 -0200 |
commit | bfdae1775a298a4240c32e87d84ea7e8c6dccb06 (patch) | |
tree | 71fe71aa5f5e5a94430023b97f16fe96e2785aa1 /railties/test | |
parent | 61f6b47204c63715b4a49f078f9d58f24f06f502 (diff) | |
download | rails-bfdae1775a298a4240c32e87d84ea7e8c6dccb06.tar.gz rails-bfdae1775a298a4240c32e87d84ea7e8c6dccb06.tar.bz2 rails-bfdae1775a298a4240c32e87d84ea7e8c6dccb06.zip |
Make possible to use symbol as the verifier name
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/application/configuration_test.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index e024ec8cef..7a8fed6732 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('salt').generate("some_value") + message = app.message_verifier(:sensitive_value).generate("some_value") - assert_equal 'some_value', Rails.application.message_verifier('salt').verify(message) + assert_equal 'some_value', Rails.application.message_verifier(:sensitive_value).verify(message) - secret = app.key_generator.generate_key('salt') + secret = app.key_generator.generate_key('sensitive_value') verifier = ActiveSupport::MessageVerifier.new(secret) assert_equal 'some_value', verifier.verify(message) end @@ -289,8 +289,8 @@ module ApplicationTests app.config.session_store :disabled end - default_verifier = app.message_verifier('salt') - text_verifier = app.message_verifier('text') + default_verifier = app.message_verifier(:sensitive_value) + 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('salt').object_id + assert_equal default_verifier.object_id, app.message_verifier(:sensitive_value).object_id assert_not_equal default_verifier.object_id, text_verifier.object_id end |