2013-02-24 08:10:46 -05:00
|
|
|
require_relative 'rexml_test_utils'
|
2010-09-17 09:14:14 -04:00
|
|
|
require 'rexml/document'
|
|
|
|
|
2014-05-27 08:07:40 -04:00
|
|
|
module REXMLTests
|
2014-05-27 09:10:55 -04:00
|
|
|
class TestIssuezillaParsing < Test::Unit::TestCase
|
|
|
|
include REXMLTestUtils
|
|
|
|
def test_rexml
|
2014-05-27 09:45:04 -04:00
|
|
|
doc = File.open(fixture_path("ofbiz-issues-full-177.xml")) do |f|
|
|
|
|
REXML::Document.new(f)
|
|
|
|
end
|
2014-05-27 09:10:55 -04:00
|
|
|
ctr = 1
|
|
|
|
doc.root.each_element('//issue') do |issue|
|
|
|
|
assert_equal( ctr, issue.elements['issue_id'].text.to_i )
|
|
|
|
ctr += 1
|
|
|
|
end
|
2010-09-17 09:14:14 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|