mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Failing test for #6034
This commit is contained in:
parent
88b5f943e6
commit
e2b97092e4
1 changed files with 20 additions and 0 deletions
|
@ -26,5 +26,25 @@ module ApplicationTests
|
||||||
require "#{app_path}/config/environment"
|
require "#{app_path}/config/environment"
|
||||||
assert app.config.session_options[:secure], "Expected session to be marked as secure"
|
assert app.config.session_options[:secure], "Expected session to be marked as secure"
|
||||||
end
|
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
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue