diff options
author | Arun Agrawal <arun@fromjaipur.com> | 2011-05-27 00:48:59 +0530 |
---|---|---|
committer | Arun Agrawal <arun@fromjaipur.com> | 2011-05-27 00:48:59 +0530 |
commit | 0094351a240598025141409e3aa309ff8b2f5c6c (patch) | |
tree | f40f057cfdc0809e51b00bbc22bf5b3c167eaff0 /activesupport/test | |
parent | d16466388eb483dce5d3c559b47254c3b641d668 (diff) | |
download | rails-0094351a240598025141409e3aa309ff8b2f5c6c.tar.gz rails-0094351a240598025141409e3aa309ff8b2f5c6c.tar.bz2 rails-0094351a240598025141409e3aa309ff8b2f5c6c.zip |
Adding tests for file_from_xml for XmlMini_JDOM #jruby
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/xml_mini/jdom_engine_test.rb | 28 |
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 |