mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fixes to TestCaseTest.
This commit is contained in:
parent
30529dc00f
commit
aaef6a3860
1 changed files with 5 additions and 4 deletions
|
@ -713,6 +713,7 @@ XML
|
||||||
def test_header_properly_reset_after_remote_http_request
|
def test_header_properly_reset_after_remote_http_request
|
||||||
xhr :get, :test_params
|
xhr :get, :test_params
|
||||||
assert_nil @request.env['HTTP_X_REQUESTED_WITH']
|
assert_nil @request.env['HTTP_X_REQUESTED_WITH']
|
||||||
|
assert_nil @request.env['HTTP_ACCEPT']
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_header_properly_reset_after_get_request
|
def test_header_properly_reset_after_get_request
|
||||||
|
@ -721,10 +722,10 @@ XML
|
||||||
assert_nil @request.instance_variable_get("@request_method")
|
assert_nil @request.instance_variable_get("@request_method")
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_params_reset_after_post_request
|
def test_params_reset_between_post_requests
|
||||||
post :no_op, :foo => "bar"
|
post :no_op, :foo => "bar"
|
||||||
assert_equal "bar", @request.params[:foo]
|
assert_equal "bar", @request.params[:foo]
|
||||||
@request.recycle!
|
|
||||||
post :no_op
|
post :no_op
|
||||||
assert @request.params[:foo].blank?
|
assert @request.params[:foo].blank?
|
||||||
end
|
end
|
||||||
|
@ -737,10 +738,10 @@ XML
|
||||||
assert_equal "baz", @request.filtered_parameters[:foo]
|
assert_equal "baz", @request.filtered_parameters[:foo]
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_path_params_reset_after_request
|
def test_path_params_reset_between_request
|
||||||
get :test_params, :id => "foo"
|
get :test_params, :id => "foo"
|
||||||
assert_equal "foo", @request.path_parameters[:id]
|
assert_equal "foo", @request.path_parameters[:id]
|
||||||
@request.recycle!
|
|
||||||
get :test_params
|
get :test_params
|
||||||
assert_nil @request.path_parameters[:id]
|
assert_nil @request.path_parameters[:id]
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue