1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Add failing test case for #2654

This commit is contained in:
Andrew White 2011-08-23 15:33:59 +01:00
parent 13400ac289
commit ebea387e4b

View file

@ -50,6 +50,10 @@ class TestTest < ActionController::TestCase
render :text => request.query_string
end
def test_protocol
render :text => request.protocol
end
def test_html_output
render :text => <<HTML
<html>
@ -598,6 +602,19 @@ XML
assert_nil @request.symbolized_path_parameters[:id]
end
def test_request_protocol_is_reset_after_request
get :test_protocol
assert_equal "http://", @response.body
@request.env["HTTPS"] = "on"
get :test_protocol
assert_equal "https://", @response.body
@request.env.delete("HTTPS")
get :test_protocol
assert_equal "http://", @response.body
end
def test_should_have_knowledge_of_client_side_cookie_state_even_if_they_are_not_set
cookies['foo'] = 'bar'
get :no_op