Skip to content
This repository
Browse code

Failing test for #6034

  • Loading branch information...
commit e23e684d3551ea7f0098724689350b83f889d045 1 parent d625a7a
Piotr Sarnacki drogus authored

Showing 1 changed file with 20 additions and 0 deletions. Show diff stats Hide diff stats

  1. +20 0 railties/test/application/middleware/session_test.rb
20 railties/test/application/middleware/session_test.rb
@@ -26,5 +26,25 @@ def app
26 26 require "#{app_path}/config/environment"
27 27 assert app.config.session_options[:secure], "Expected session to be marked as secure"
28 28 end
  29 +
  30 + test "session is not loaded if it's not used" do
  31 + make_basic_app
  32 +
  33 + class ::OmgController < ActionController::Base
  34 + def index
  35 + if params[:flash]
  36 + flash[:notice] = "notice"
  37 + end
  38 +
  39 + render :nothing => true
  40 + end
  41 + end
  42 +
  43 + get "/?flash=true"
  44 + get "/"
  45 +
  46 + assert last_request.env["HTTP_COOKIE"]
  47 + assert !last_response.headers["Set-Cookie"]
  48 + end
29 49 end
30 50 end

0 comments on commit e23e684

Please sign in to comment.
Something went wrong with that request. Please try again.