diff options
author | José Valim <jose.valim@gmail.com> | 2010-05-18 01:43:06 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-05-18 02:05:20 +0200 |
commit | 25f7c030e4ea440ea6c2a84c92118299753392d9 (patch) | |
tree | e2c1168b9342db55a982c2452b46ff5999e59394 /railties/test/application | |
parent | 941b653627b9ca7b7f2ddb4a712fb0efccc10500 (diff) | |
download | rails-25f7c030e4ea440ea6c2a84c92118299753392d9.tar.gz rails-25f7c030e4ea440ea6c2a84c92118299753392d9.tar.bz2 rails-25f7c030e4ea440ea6c2a84c92118299753392d9.zip |
Simplify cookie_store by simply relying on cookies.signed.
Diffstat (limited to 'railties/test/application')
-rw-r--r-- | railties/test/application/configuration_test.rb | 4 | ||||
-rw-r--r-- | railties/test/application/middleware_test.rb | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index c08bd2ef22..9928ee2c52 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -196,7 +196,7 @@ module ApplicationTests test "config.secret_token is sent in env" do make_basic_app do |app| - app.config.secret_token = 'ThisIsASECRET123' + app.config.secret_token = 'b3c631c314c0bbca50c1b2843150fe33' app.config.session_store :disabled end @@ -208,7 +208,7 @@ module ApplicationTests end get "/" - assert_equal 'ThisIsASECRET123', last_response.body + assert_equal 'b3c631c314c0bbca50c1b2843150fe33', last_response.body end test "protect from forgery is the default in a new app" do diff --git a/railties/test/application/middleware_test.rb b/railties/test/application/middleware_test.rb index d08f04bddb..617525bf78 100644 --- a/railties/test/application/middleware_test.rb +++ b/railties/test/application/middleware_test.rb @@ -175,7 +175,10 @@ module ApplicationTests def remote_ip(env = {}) remote_ip = nil - env = Rack::MockRequest.env_for("/").merge(env).merge('action_dispatch.show_exceptions' => false) + env = Rack::MockRequest.env_for("/").merge(env).merge!( + 'action_dispatch.show_exceptions' => false, + 'action_dispatch.secret_token' => 'b3c631c314c0bbca50c1b2843150fe33' + ) endpoint = Proc.new do |e| remote_ip = ActionDispatch::Request.new(e).remote_ip |