Skip to content
This repository
Browse code

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

  • Loading branch information...
commit d8b6fcbf4425a307c8c3a3d6e70852ea1d286497 1 parent 6431087
Arun Agrawal arunagw authored

Showing 1 changed file with 14 additions and 14 deletions. Show diff stats Hide diff stats

  1. +14 14 activesupport/test/xml_mini/jdom_engine_test.rb
28 activesupport/test/xml_mini/jdom_engine_test.rb
@@ -16,20 +16,20 @@ def teardown
16 16 XmlMini.backend = @default_backend
17 17 end
18 18
19   - # def test_file_from_xml
20   - # hash = Hash.from_xml(<<-eoxml)
21   - # <blog>
22   - # <logo type="file" name="logo.png" content_type="image/png">
23   - # </logo>
24   - # </blog>
25   - # eoxml
26   - # assert hash.has_key?('blog')
27   - # assert hash['blog'].has_key?('logo')
28   - #
29   - # file = hash['blog']['logo']
30   - # assert_equal 'logo.png', file.original_filename
31   - # assert_equal 'image/png', file.content_type
32   - # end
  19 + def test_file_from_xml
  20 + hash = Hash.from_xml(<<-eoxml)
  21 + <blog>
  22 + <logo type="file" name="logo.png" content_type="image/png">
  23 + </logo>
  24 + </blog>
  25 + eoxml
  26 + assert hash.has_key?('blog')
  27 + assert hash['blog'].has_key?('logo')
  28 +
  29 + file = hash['blog']['logo']
  30 + assert_equal 'logo.png', file.original_filename
  31 + assert_equal 'image/png', file.content_type
  32 + end
33 33
34 34 def test_exception_thrown_on_expansion_attack
35 35 assert_raise NativeException do

0 comments on commit d8b6fcb

Please sign in to comment.
Something went wrong with that request. Please try again.