Skip to content

Commit

Permalink
add missing unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
ThierryO committed May 28, 2019
1 parent 9712652 commit 2d2d3b8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/testthat/test_e_upgrade.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ test_that("upgrade_data() validates metadata", {

correct_yaml <- yaml::read_yaml(file.path(root, junk[2]))
junk_yaml <- correct_yaml
junk_yaml[["..generic"]][["git2rdata"]] <- "0.0.4"
yaml::write_yaml(junk_yaml, file.path(root, junk[2]))
expect_identical(
unname(upgrade_data(file = file, root = root)),
file
)
junk_yaml <- correct_yaml
junk_yaml[["..generic"]][["git2rdata"]] <- NULL
junk_yaml[["test_Date"]] <- NULL
yaml::write_yaml(junk_yaml, file.path(root, junk[2]))
Expand Down

0 comments on commit 2d2d3b8

Please sign in to comment.