aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/webservice_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller/webservice_test.rb')
-rw-r--r--actionpack/test/controller/webservice_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/test/controller/webservice_test.rb b/actionpack/test/controller/webservice_test.rb
index d49f6e7941..5cf92146a8 100644
--- a/actionpack/test/controller/webservice_test.rb
+++ b/actionpack/test/controller/webservice_test.rb
@@ -134,6 +134,14 @@ class WebServiceTest < Test::Unit::TestCase
assert_equal [1, "hello", Date.new(1974,7,25)], params[:data][:g]
end
+ def test_entities_unescaped_as_xml_simple
+ ActionController::Base.param_parsers[Mime::XML] = :xml_simple
+ process('POST', 'application/xml', <<-XML)
+ <data>&lt;foo &quot;bar&apos;s&quot; &amp; friends&gt;</data>
+ XML
+ assert_equal %(<foo "bar's" & friends>), @controller.params[:data]
+ end
+
def test_dasherized_keys_as_yaml
ActionController::Base.param_parsers[Mime::YAML] = :yaml
process('POST', 'application/x-yaml', "---\nfirst-key:\n sub-key: ...\n", true)