diff --git a/DESCRIPTION b/DESCRIPTION index 27f1663..2f2c572 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Type: Package Package: streetlightR Title: Interact with StreetLight Data's API in R -Version: 1.2.0 -Date: 2023-12-21 +Version: 1.2.1 +Date: 2023-12-26 Authors@R: c( person("Metropolitan Council", role = "cph"), person("Liz", "Roten", , "liz.roten@metc.state.mn.us", role = c("cre", "aut"), diff --git a/R/validate_parameters.R b/R/validate_parameters.R index 7bcef36..86ab470 100644 --- a/R/validate_parameters.R +++ b/R/validate_parameters.R @@ -40,7 +40,7 @@ validate_parameters <- function(param, "metric", "country" )) { - if (!is.character(value)) { + if (!is.character(value) & !is.call(value)) { cli::cli_abort(paste0( "Parameter {param} must be a string." )) @@ -52,7 +52,7 @@ validate_parameters <- function(param, "aadt_year", "aadt_calibration_year" )) { - if (!is.numeric(value)) { + if (!is.numeric(value) & !is.call(value)) { cli::cli_abort(paste0( "Parameter {param} must be numeric." )) @@ -75,7 +75,7 @@ validate_parameters <- function(param, "enable_completion_email", "with_calibration" )) { - if (!is.logical(value)) { + if (!is.logical(value) & !is.call(value)) { cli::cli_abort(paste0( "Parameter {param} must be a TRUE or FALSE" )) diff --git a/tests/testthat/test-create_tag.R b/tests/testthat/test-create_tag.R index c7161af..e128d61 100644 --- a/tests/testthat/test-create_tag.R +++ b/tests/testthat/test-create_tag.R @@ -4,5 +4,5 @@ test_that("create tag testing", { login_email = test_login, "streetlightR" ) %>% - testthat::expect_warning("Tag names must be case-insensitive unique.") + testthat::expect_warning("Tag names must be case-insensitive") })