Skip to content

Commit

Permalink
update vignette and tests to reflect accepted changes with NULL VALUES
Browse files Browse the repository at this point in the history
  • Loading branch information
datapumpernickel committed Jul 31, 2023
1 parent 849cba1 commit 86d9d1d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 24 deletions.
2 changes: 1 addition & 1 deletion man/ct_commodity_lookup.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions man/ct_get_data.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 9 additions & 14 deletions tests/testthat/test-ct_check_parameters.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ test_that("check_flowCode returns correct flow codes and handles invalid inputs"
expect_equal(check_flowCode("import"), "M")
expect_equal(check_flowCode(c("export", "re-export")), "X,RX")
expect_error(check_flowCode("trade"), "`flow_direction` must be one of")
expect_error(check_flowCode(NULL), "`flow_direction` must be a character vector, not `NULL`")
# expect_error(check_flowCode(NULL), "`flow_direction` must be a character vector, not `NULL`")
expect_error(check_flowCode(c("all", "import")), "You can only provide 'all' as a single argument.")
})

Expand Down Expand Up @@ -65,14 +65,14 @@ testthat::test_that("check_cmdCode function works correctly", {
)
)

testthat::expect_error(
comtradr:::check_cmdCode(
commodity_classification = "HS",
commodity_code = NULL,
update = FALSE,
verbose = FALSE
)
)
# testthat::expect_error(
# comtradr:::check_cmdCode(
# commodity_classification = "HS",
# commodity_code = NULL,
# update = FALSE,
# verbose = FALSE
# )
# )
})

testthat::test_that("check_reporterCode function works correctly", {
Expand Down Expand Up @@ -102,11 +102,6 @@ testthat::test_that("check_reporterCode function works correctly", {
)
) > 0)

testthat::expect_error(comtradr:::check_reporterCode(
reporter = NULL,
update = FALSE,
verbose = FALSE
))
})


Expand Down

0 comments on commit 86d9d1d

Please sign in to comment.