Browse files

File From Xml is working now. #3-0-stable

  • Loading branch information...
1 parent 6431087 commit d8b6fcbf4425a307c8c3a3d6e70852ea1d286497 @arunagw arunagw committed May 28, 2011
Showing with 14 additions and 14 deletions.
  1. +14 −14 activesupport/test/xml_mini/jdom_engine_test.rb
View
28 activesupport/test/xml_mini/jdom_engine_test.rb
@@ -16,20 +16,20 @@ def teardown
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

0 comments on commit d8b6fcb

Please sign in to comment.