From ad56fb438269cbd4808357ce2a98a656be763ecc Mon Sep 17 00:00:00 2001 From: Dave Slager Date: Wed, 6 Mar 2024 18:47:31 -0800 Subject: [PATCH] deprecated fn --- R/ebirdregioncheck.R | 4 ++-- tests/testthat/test-ebirdregioncheck.R | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/R/ebirdregioncheck.R b/R/ebirdregioncheck.R index 5d750d0..62aff7c 100644 --- a/R/ebirdregioncheck.R +++ b/R/ebirdregioncheck.R @@ -18,7 +18,7 @@ #' Andy Teucher \email{andy.teucher@@gmail.com} #' @references \url{http://ebird.org/} -ebirdregioncheck <- function(loc, key = NULL, ...) { +ebirdregioncheck <- function(loc, key = NULL, ...) { # nocov start .Deprecated(new = "ebirdregioninfo", msg = "Deprecated: 'ebirdregioncheck' will be removed in the next version of rebird. Use 'ebirdregioninfo' instead.") if (length(loc) > 1) { @@ -30,4 +30,4 @@ ebirdregioncheck <- function(loc, key = NULL, ...) { grepl("HTTP [403|400]", out)) stop(out) # HTTP error codes that should # throw errors rather than return false "tbl_df" %in% class(out) -} +} # nocov end diff --git a/tests/testthat/test-ebirdregioncheck.R b/tests/testthat/test-ebirdregioncheck.R index a93027c..6a9b000 100644 --- a/tests/testthat/test-ebirdregioncheck.R +++ b/tests/testthat/test-ebirdregioncheck.R @@ -18,6 +18,7 @@ test_that("ebirdregioncheck works correctly", { test_that("ebirdregioncheck fails correctly", { skip_on_cran() + skip_on_ci() expect_error(suppressWarnings(ebirdregioncheck())) expect_error(suppressWarnings(ebirdregioncheck(c("foo", "bar"))))