From 7e46571115735373ad5993468c8891016057fbb2 Mon Sep 17 00:00:00 2001 From: Jamis Buck Date: Sat, 18 Mar 2006 06:21:04 +0000 Subject: Add a test to make sure basic XML entities get unescaped properly git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3918 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/controller/webservice_test.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'actionpack/test/controller/webservice_test.rb') 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) + <foo "bar's" & friends> + XML + assert_equal %(), @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) -- cgit v1.2.3