diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-11-25 19:49:49 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-11-25 19:49:49 -0800 |
commit | 4073a6d0a2f5926e10f06fe1702db7b1b7a20751 (patch) | |
tree | bf427543aa2f400d514bf8bb8a2d5d4c8c0fc1c1 | |
parent | ab8fff2e3a1d023e13e2600a92676f79011db4ca (diff) | |
download | rails-4073a6d0a2f5926e10f06fe1702db7b1b7a20751.tar.gz rails-4073a6d0a2f5926e10f06fe1702db7b1b7a20751.tar.bz2 rails-4073a6d0a2f5926e10f06fe1702db7b1b7a20751.zip |
Remove XmlSimple dependencies
-rw-r--r-- | actionpack/test/controller/webservice_test.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/actionpack/test/controller/webservice_test.rb b/actionpack/test/controller/webservice_test.rb index 32f67ddd6c..6d2b3e4f23 100644 --- a/actionpack/test/controller/webservice_test.rb +++ b/actionpack/test/controller/webservice_test.rb @@ -101,14 +101,13 @@ class WebServiceTest < Test::Unit::TestCase end def test_post_xml_using_an_attributted_node_named_type - ActionController::Base.param_parsers[Mime::XML] = Proc.new { |data| XmlSimple.xml_in(data, 'ForceArray' => false) } + ActionController::Base.param_parsers[Mime::XML] = Proc.new { |data| Hash.from_xml(data)['request'].with_indifferent_access } process('POST', 'application/xml', '<request><type type="string">Arial,12</type><z>3</z></request>') assert_equal 'type, z', @controller.response.body assert @controller.params.has_key?(:type) - assert_equal 'string', @controller.params['type']['type'] - assert_equal 'Arial,12', @controller.params['type']['content'] - assert_equal '3', @controller.params['z'] + assert_equal 'Arial,12', @controller.params['type'], @controller.params.inspect + assert_equal '3', @controller.params['z'], @controller.params.inspect end def test_register_and_use_yaml @@ -128,7 +127,7 @@ class WebServiceTest < Test::Unit::TestCase end def test_register_and_use_xml_simple - ActionController::Base.param_parsers[Mime::XML] = Proc.new { |data| XmlSimple.xml_in(data, 'ForceArray' => false) } + ActionController::Base.param_parsers[Mime::XML] = Proc.new { |data| Hash.from_xml(data)['request'].with_indifferent_access } process('POST', 'application/xml', '<request><summary>content...</summary><title>SimpleXml</title></request>' ) assert_equal 'summary, title', @controller.response.body assert @controller.params.has_key?(:summary) |