aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/xml_mini/jdom_engine_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/test/xml_mini/jdom_engine_test.rb')
-rw-r--r--activesupport/test/xml_mini/jdom_engine_test.rb28
1 files changed, 14 insertions, 14 deletions
diff --git a/activesupport/test/xml_mini/jdom_engine_test.rb b/activesupport/test/xml_mini/jdom_engine_test.rb
index 3fe5e4fd78..7f809e7898 100644
--- a/activesupport/test/xml_mini/jdom_engine_test.rb
+++ b/activesupport/test/xml_mini/jdom_engine_test.rb
@@ -15,20 +15,20 @@ if RUBY_PLATFORM =~ /java/
XmlMini.backend = @default_backend
end
- # def test_file_from_xml
- # hash = Hash.from_xml(<<-eoxml)
- # <blog>
- # <logo type="file" name="logo.png" content_type="image/png">
- # </logo>
- # </blog>
- # eoxml
- # assert hash.has_key?('blog')
- # assert hash['blog'].has_key?('logo')
- #
- # file = hash['blog']['logo']
- # assert_equal 'logo.png', file.original_filename
- # assert_equal 'image/png', file.content_type
- # end
+ def test_file_from_xml
+ hash = Hash.from_xml(<<-eoxml)
+ <blog>
+ <logo type="file" name="logo.png" content_type="image/png">
+ </logo>
+ </blog>
+ eoxml
+ assert hash.has_key?('blog')
+ assert hash['blog'].has_key?('logo')
+
+ file = hash['blog']['logo']
+ assert_equal 'logo.png', file.original_filename
+ assert_equal 'image/png', file.content_type
+ end
def test_exception_thrown_on_expansion_attack
assert_raise NativeException do