aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/application/middleware
diff options
context:
space:
mode:
authorPiotr Sarnacki <drogus@gmail.com>2012-04-29 23:36:39 -0700
committerPiotr Sarnacki <drogus@gmail.com>2012-04-30 00:17:35 -0700
commit2b2983d76fd11efc219273036a612f47cfaa5bfa (patch)
tree5bd2522c7a69910efa3d576e3bf2df1ed79ff4d9 /railties/test/application/middleware
parente3069c64b2c5ddc7a5789b55b8efd4902d9e9729 (diff)
downloadrails-2b2983d76fd11efc219273036a612f47cfaa5bfa.tar.gz
rails-2b2983d76fd11efc219273036a612f47cfaa5bfa.tar.bz2
rails-2b2983d76fd11efc219273036a612f47cfaa5bfa.zip
Failing test for #6034
Diffstat (limited to 'railties/test/application/middleware')
-rw-r--r--railties/test/application/middleware/session_test.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/railties/test/application/middleware/session_test.rb b/railties/test/application/middleware/session_test.rb
index 9f39e18a74..aee2417abc 100644
--- a/railties/test/application/middleware/session_test.rb
+++ b/railties/test/application/middleware/session_test.rb
@@ -26,5 +26,25 @@ 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