aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-05-27 11:52:43 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2011-05-27 11:52:43 -0700
commit62d5ef0c17b41ce8b3a5578e98081caeb4ba190e (patch)
treecb089c5a50365507519e03a2034c556dd411e316 /activesupport/test
parent8628948e2a2c874facc66a1d7b328431f8c0b3c8 (diff)
parent0094351a240598025141409e3aa309ff8b2f5c6c (diff)
downloadrails-62d5ef0c17b41ce8b3a5578e98081caeb4ba190e.tar.gz
rails-62d5ef0c17b41ce8b3a5578e98081caeb4ba190e.tar.bz2
rails-62d5ef0c17b41ce8b3a5578e98081caeb4ba190e.zip
Merge pull request #1346 from arunagw/jdom_file_from_xml_fix
Jdom file from xml fix
Diffstat (limited to 'activesupport/test')
-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