aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators
diff options
context:
space:
mode:
authorLukasz Sarnacki <lukesarnacki@gmail.com>2014-01-10 12:57:50 +0100
committerLukasz Sarnacki <lukesarnacki@gmail.com>2014-01-29 17:05:00 +0100
commitb23ffd0dac895aa3fd3afd8d9be36794941731b2 (patch)
treea287df4bfcaff9c0838d3f4062a02fd1e5134b9f /railties/test/generators
parentf142527eb30626904cb1e655a1a28801f08b8acf (diff)
downloadrails-b23ffd0dac895aa3fd3afd8d9be36794941731b2.tar.gz
rails-b23ffd0dac895aa3fd3afd8d9be36794941731b2.tar.bz2
rails-b23ffd0dac895aa3fd3afd8d9be36794941731b2.zip
Allow session serializer key in config.session_store
MessageEncryptor has :serializer option, where any serializer object can be passed. This commit make it possible to set this serializer from configuration level. There are predefined serializers (:marshal_serializer, :json_serialzier) and custom serializer can be passed as String, Symbol (camelized and constantized in ActionDispatch::Session namepspace) or serializer object. Default :json_serializer was also added to generators to provide secure defalt.
Diffstat (limited to 'railties/test/generators')
-rw-r--r--railties/test/generators/app_generator_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb
index ddecee2ca1..8aa306c8e0 100644
--- a/railties/test/generators/app_generator_test.rb
+++ b/railties/test/generators/app_generator_test.rb
@@ -433,7 +433,7 @@ class AppGeneratorTest < Rails::Generators::TestCase
def test_new_hash_style
run_generator [destination_root]
assert_file "config/initializers/session_store.rb" do |file|
- assert_match(/config.session_store :cookie_store, key: '_.+_session'/, file)
+ assert_match(/config.session_store :cookie_store, key: '_.+_session', serializer: :json_serializer/, file)
end
end