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
This commit is contained in:
parent
4e0028fbab
commit
7e46571115
@ -134,6 +134,14 @@ def test_typecast_as_xml
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user