Skip to content

Commit

Permalink
adjusted tests to account for changes in datasets which caused tests …
Browse files Browse the repository at this point in the history
…to fail
  • Loading branch information
datapumpernickel committed May 8, 2024
1 parent 3539651 commit 07301ed
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/testthat/test-utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ test_that("ct_commodity_lookup returns correct values for commodity codes",

test_that("ct_commodity_lookup returns correct values for commodity names",
{
results <- ct_commodity_lookup(c("Frog legs"), return_code = FALSE)
results <- ct_commodity_lookup(c("frogs' legs"), return_code = FALSE)
expect_equal(results,
list("Frog legs" = "020820 - Frog legs, fresh, chilled or frozen")) # nolint
list("frogs' legs" = "020820 - - Frogs' legs")) # nolint
})

test_that("ct_commodity_lookup returns correct values when return_char = TRUE",
{
results <-
ct_commodity_lookup(c("frog legs"),
ct_commodity_lookup(c("frogs' legs"),
return_code = FALSE,
return_char = TRUE)
expect_equal(results, c("020820 - Frog legs, fresh, chilled or frozen")) # nolint
expect_equal(results, c("020820 - - Frogs' legs")) # nolint
})

test_that("ct_commodity_lookup warns when no matching results are found", {
Expand Down

0 comments on commit 07301ed

Please sign in to comment.