diff options
author | Jamis Buck <jamis@37signals.com> | 2006-03-18 06:21:04 +0000 |
---|---|---|
committer | Jamis Buck <jamis@37signals.com> | 2006-03-18 06:21:04 +0000 |
commit | 7e46571115735373ad5993468c8891016057fbb2 (patch) | |
tree | 22eef8a9c079cced8c20033eb8c2fa3ec7f0d1ff /actionpack/test | |
parent | 4e0028fbaba3b0497ba5a0fbf0cd314137b7aa8f (diff) | |
download | rails-7e46571115735373ad5993468c8891016057fbb2.tar.gz rails-7e46571115735373ad5993468c8891016057fbb2.tar.bz2 rails-7e46571115735373ad5993468c8891016057fbb2.zip |
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
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/webservice_test.rb | 8 |
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><foo "bar's" & friends></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) |