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:
parent
13400ac289
commit
ebea387e4b
1 changed files with 17 additions and 0 deletions
|
@ -50,6 +50,10 @@ class TestTest < ActionController::TestCase
|
||||||
render :text => request.query_string
|
render :text => request.query_string
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_protocol
|
||||||
|
render :text => request.protocol
|
||||||
|
end
|
||||||
|
|
||||||
def test_html_output
|
def test_html_output
|
||||||
render :text => <<HTML
|
render :text => <<HTML
|
||||||
<html>
|
<html>
|
||||||
|
@ -598,6 +602,19 @@ XML
|
||||||
assert_nil @request.symbolized_path_parameters[:id]
|
assert_nil @request.symbolized_path_parameters[:id]
|
||||||
end
|
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
|
def test_should_have_knowledge_of_client_side_cookie_state_even_if_they_are_not_set
|
||||||
cookies['foo'] = 'bar'
|
cookies['foo'] = 'bar'
|
||||||
get :no_op
|
get :no_op
|
||||||
|
|
Loading…
Reference in a new issue