From 3cba6eee66a4c25b93839ea6fd1da08d7780f2de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Tue, 5 Jun 2012 15:10:20 -0300 Subject: Revert "fix the Flash middleware loading the session on every request (very dangerous especially with Rack::Cache), it should only be loaded when the flash method is called" This reverts commits e3069c64b2c5ddc7a5789b55b8efd4902d9e9729 and 2b2983d76fd11efc219273036a612f47cfaa5bfa. Reason: This add a non-backward compatible change in the way that flash works now (swept in every request). --- railties/test/application/middleware/session_test.rb | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'railties/test/application/middleware') diff --git a/railties/test/application/middleware/session_test.rb b/railties/test/application/middleware/session_test.rb index aee2417abc..9f39e18a74 100644 --- a/railties/test/application/middleware/session_test.rb +++ b/railties/test/application/middleware/session_test.rb @@ -26,25 +26,5 @@ module ApplicationTests require "#{app_path}/config/environment" assert app.config.session_options[:secure], "Expected session to be marked as secure" end - - test "session is not loaded if it's not used" do - make_basic_app - - class ::OmgController < ActionController::Base - def index - if params[:flash] - flash[:notice] = "notice" - end - - render :nothing => true - end - end - - get "/?flash=true" - get "/" - - assert last_request.env["HTTP_COOKIE"] - assert !last_response.headers["Set-Cookie"] - end end end -- cgit v1.2.3