diff options
author | Carlhuda <carlhuda@engineyard.com> | 2010-03-04 15:06:25 -0800 |
---|---|---|
committer | Carlhuda <carlhuda@engineyard.com> | 2010-03-04 16:05:52 -0800 |
commit | e311622e7b20b3fdeab6a93418c8a45c6e7137b6 (patch) | |
tree | a0b7ce433c1ce65da2bc5e9fdb9e8d70753537da /railties/test/application | |
parent | 48bb3b3904806abaea7c62961559c03e689dd12f (diff) | |
download | rails-e311622e7b20b3fdeab6a93418c8a45c6e7137b6.tar.gz rails-e311622e7b20b3fdeab6a93418c8a45c6e7137b6.tar.bz2 rails-e311622e7b20b3fdeab6a93418c8a45c6e7137b6.zip |
Deprecated ActionController::Base.session_options= and ActionController::Base.session_store= in favor of a config.session_store method (which takes params) and a config.cookie_secret variable, which is used in various secret scenarios. The old AC::Base options will continue to work with deprecation warnings.
Diffstat (limited to 'railties/test/application')
4 files changed, 10 insertions, 6 deletions
diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index 25389c86f7..54cd751f4e 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -177,7 +177,8 @@ module ApplicationTests require "action_controller/railtie" class MyApp < Rails::Application - config.action_dispatch.session = { :key => "_myapp_session", :secret => "3b7cd727ee24e8444053437c36cc66c4" } + config.cookie_secret = "3b7cd727ee24e8444053437c36cc66c4" + config.session_store :cookie_store, :key => "_myapp_session" end MyApp.initialize! @@ -204,7 +205,8 @@ module ApplicationTests require "action_controller/railtie" class MyApp < Rails::Application - config.action_dispatch.session = { :key => "_myapp_session", :secret => "3b7cd727ee24e8444053437c36cc66c4" } + config.cookie_secret = "3b7cd727ee24e8444053437c36cc66c4" + config.session_store :cookie_store, :key => "_myapp_session" config.action_dispatch.x_sendfile_header = 'X-Lighttpd-Send-File' end diff --git a/railties/test/application/initializers/frameworks_test.rb b/railties/test/application/initializers/frameworks_test.rb index d74de3d666..8e57022e5b 100644 --- a/railties/test/application/initializers/frameworks_test.rb +++ b/railties/test/application/initializers/frameworks_test.rb @@ -65,7 +65,7 @@ module ApplicationTests test "database middleware doesn't initialize when session store is not active_record" do add_to_config <<-RUBY config.root = "#{app_path}" - config.action_dispatch.session_store = :cookie_store + config.session_store :cookie_store, { :key => "blahblahblah" } RUBY require "#{app_path}/config/environment" @@ -73,7 +73,7 @@ module ApplicationTests end test "database middleware initializes when session store is active record" do - add_to_config "config.action_dispatch.session_store = :active_record_store" + add_to_config "config.session_store :active_record_store" require "#{app_path}/config/environment" diff --git a/railties/test/application/middleware_stack_defaults_test.rb b/railties/test/application/middleware_stack_defaults_test.rb index 9086ddcfe7..284f7e2e5b 100644 --- a/railties/test/application/middleware_stack_defaults_test.rb +++ b/railties/test/application/middleware_stack_defaults_test.rb @@ -10,7 +10,8 @@ class MiddlewareStackDefaultsTest < Test::Unit::TestCase Object.const_set(:MyApplication, Class.new(Rails::Application)) MyApplication.class_eval do - config.action_dispatch.session = { :key => "_myapp_session", :secret => "OMG A SEKRET" * 10 } + config.cookie_secret = "3b7cd727ee24e8444053437c36cc66c4" + config.session_store :cookie_store, :key => "_myapp_session" end end diff --git a/railties/test/application/url_generation_test.rb b/railties/test/application/url_generation_test.rb index f8e9a39969..04f5454e09 100644 --- a/railties/test/application/url_generation_test.rb +++ b/railties/test/application/url_generation_test.rb @@ -14,7 +14,8 @@ module ApplicationTests require "action_controller/railtie" class MyApp < Rails::Application - config.action_dispatch.session = { :key => "_myapp_session", :secret => "3b7cd727ee24e8444053437c36cc66c4" } + config.cookie_secret = "3b7cd727ee24e8444053437c36cc66c4" + config.session_store :cookie_store, :key => "_myapp_session" end MyApp.initialize! |