Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adding tests for file_from_xml for XmlMini_JDOM #jruby

  • Loading branch information...
commit 0094351a240598025141409e3aa309ff8b2f5c6c 1 parent d164663
@arunagw arunagw authored
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
@@ -15,20 +15,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
Please sign in to comment.
Something went wrong with that request. Please try again.