Skip to content

Commit

Permalink
#11 fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
eblondel committed Apr 9, 2022
1 parent e2065b9 commit 7450666
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/testthat/test_DCEntry.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,12 @@ test_that("decoding Zenodo Dublin core",{
dcxml <- XML::xmlParse(dcfile)
dcentry <- DCEntry$new(xml = dcxml)
dcentry_xml <- dcentry$encode()

dcxml_children <- XML::xmlChildren(XML::xmlChildren(dcxml)[[1]])
dcentry_xml_children <- XML::xmlChildren(dcentry_xml)
dcentry_xml_children <- dcentry_xml_children[!names(dcentry_xml_children) %in% c("updated", "comment")]
expect_equal(
length(XML::xmlChildren(XML::xmlChildren(dcxml)[[1]])),
length(XML::xmlChildren(XML::xmlChildren(dcentry_xml)[[1]]))
length(dcxml_children),
length(dcentry_xml_children)
)
})

0 comments on commit 7450666

Please sign in to comment.