Skip to content

Commit

Permalink
Add tests for defunct functions
Browse files Browse the repository at this point in the history
  • Loading branch information
willgearty committed Oct 4, 2024
1 parent 98909a7 commit 77b82a1
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
3 changes: 0 additions & 3 deletions R/defunct.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# nocov start

#' Get common names for a given taxonomic name
#'
#' @description `r lifecycle::badge('deprecated')`
Expand Down Expand Up @@ -286,4 +284,3 @@ rl_synonyms_ <- function(name = NULL, key = NULL, ...) {
lifecycle::deprecate_stop("1.0.0", "rl_synonyms_()",
"rl_species_latest()")
}
# nocov end
26 changes: 26 additions & 0 deletions tests/testthat/test-defunct.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
test_that("defunct functions works", {
lifecycle::expect_defunct(rl_common_names())
lifecycle::expect_defunct(rl_common_names_())
lifecycle::expect_defunct(rl_history())
lifecycle::expect_defunct(rl_history_())
lifecycle::expect_defunct(rl_measures())
lifecycle::expect_defunct(rl_measures_())
lifecycle::expect_defunct(rl_narrative())
lifecycle::expect_defunct(rl_narrative_())
lifecycle::expect_defunct(rl_occ_country())
lifecycle::expect_defunct(rl_occ_country_())
lifecycle::expect_defunct(rl_regions())
lifecycle::expect_defunct(rl_regions_())
lifecycle::expect_defunct(rl_search())
lifecycle::expect_defunct(rl_search_())
lifecycle::expect_defunct(rl_sp())
lifecycle::expect_defunct(rl_sp_())
lifecycle::expect_defunct(rl_sp_category())
lifecycle::expect_defunct(rl_sp_category_())
lifecycle::expect_defunct(rl_sp_citation())
lifecycle::expect_defunct(rl_sp_citation_())
lifecycle::expect_defunct(rl_sp_country())
lifecycle::expect_defunct(rl_sp_country_())
lifecycle::expect_defunct(rl_synonyms())
lifecycle::expect_defunct(rl_synonyms_())
})

0 comments on commit 77b82a1

Please sign in to comment.