diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2013-01-05 17:46:26 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-01-08 12:41:04 -0800 |
commit | c31cc963daac55f6a3bca9da99b619276911dbd7 (patch) | |
tree | bfae05fc707ae5529b60dbe10bfd5891dab8de73 /actionpack/test | |
parent | 88cc1688d0cb828c17706b41a8bd27870f2a2beb (diff) | |
download | rails-c31cc963daac55f6a3bca9da99b619276911dbd7.tar.gz rails-c31cc963daac55f6a3bca9da99b619276911dbd7.tar.bz2 rails-c31cc963daac55f6a3bca9da99b619276911dbd7.zip |
Revert "Merge branch 'master-sec'"
This reverts commit 88cc1688d0cb828c17706b41a8bd27870f2a2beb, reversing
changes made to f049016cd348627bf8db0d72382d7580bf802a79.
Diffstat (limited to 'actionpack/test')
3 files changed, 0 insertions, 45 deletions
diff --git a/actionpack/test/controller/webservice_test.rb b/actionpack/test/controller/webservice_test.rb index 2602540fbe..c0b9833603 100644 --- a/actionpack/test/controller/webservice_test.rb +++ b/actionpack/test/controller/webservice_test.rb @@ -116,19 +116,6 @@ class WebServiceTest < ActionDispatch::IntegrationTest end end - def test_post_xml_using_a_disallowed_type_attribute - $stderr = StringIO.new - with_test_route_set do - post '/', '<foo type="symbol">value</foo>', 'CONTENT_TYPE' => 'application/xml' - assert_response 500 - - post '/', '<foo type="yaml">value</foo>', 'CONTENT_TYPE' => 'application/xml' - assert_response 500 - end - ensure - $stderr = STDERR - end - def test_register_and_use_yaml with_test_route_set do with_params_parsers Mime::YAML => Proc.new { |d| YAML.load(d) } do diff --git a/actionpack/test/dispatch/request/json_params_parsing_test.rb b/actionpack/test/dispatch/request/json_params_parsing_test.rb index 2c4a6c2147..c0c3147e37 100644 --- a/actionpack/test/dispatch/request/json_params_parsing_test.rb +++ b/actionpack/test/dispatch/request/json_params_parsing_test.rb @@ -30,21 +30,6 @@ class JsonParamsParsingTest < ActionDispatch::IntegrationTest ) end - test "nils are stripped from collections" do - assert_parses( - {"person" => nil}, - "{\"person\":[null]}", { 'CONTENT_TYPE' => 'application/json' } - ) - assert_parses( - {"person" => ['foo']}, - "{\"person\":[\"foo\",null]}", { 'CONTENT_TYPE' => 'application/json' } - ) - assert_parses( - {"person" => nil}, - "{\"person\":[null, null]}", { 'CONTENT_TYPE' => 'application/json' } - ) - end - test "logs error if parsing unsuccessful" do with_test_routing do output = StringIO.new diff --git a/actionpack/test/dispatch/request/xml_params_parsing_test.rb b/actionpack/test/dispatch/request/xml_params_parsing_test.rb index f13b64a3c7..cb68667002 100644 --- a/actionpack/test/dispatch/request/xml_params_parsing_test.rb +++ b/actionpack/test/dispatch/request/xml_params_parsing_test.rb @@ -30,23 +30,6 @@ class XmlParamsParsingTest < ActionDispatch::IntegrationTest assert_equal "<ok>bar</ok>", resp.body end - def assert_parses(expected, xml) - with_test_routing do - post "/parse", xml, default_headers - assert_response :ok - assert_equal(expected, TestController.last_request_parameters) - end - end - - test "nils are stripped from collections" do - assert_parses( - {"hash" => { "person" => nil} }, - "<hash><person type=\"array\"><person nil=\"true\"/></person></hash>") - assert_parses( - {"hash" => { "person" => ['foo']} }, - "<hash><person type=\"array\"><person>foo</person><person nil=\"true\"/></person>\n</hash>") - end - test "parses hash params" do with_test_routing do xml = "<person><name>David</name></person>" |