From 0094351a240598025141409e3aa309ff8b2f5c6c Mon Sep 17 00:00:00 2001 From: Arun Agrawal Date: Fri, 27 May 2011 00:48:59 +0530 Subject: Adding tests for file_from_xml for XmlMini_JDOM #jruby --- activesupport/test/xml_mini/jdom_engine_test.rb | 28 ++++++++++++------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'activesupport/test') 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) - # - # - # - # - # 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) + + + + + 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 -- cgit v1.2.3