Skip to content

Commit

Permalink
activate test file
Browse files Browse the repository at this point in the history
  • Loading branch information
slager committed Mar 6, 2024
1 parent 56dff4f commit 3f01167
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions tests/testthat/test-species_code.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
context("species_code")

test_that("species_code works correctly", {
skip_on_cran()

sp1 <- species_code("anhinga novaehollandiae")
sp2 <- species_code("Anhinga anhinga")
expect_is(sp1, "character")
Expand All @@ -13,11 +9,8 @@ test_that("species_code works correctly", {
})

test_that("species_code fails correctly", {
skip_on_cran()
expect_error(species_code())
expect_error(species_code(1), "sciname is not a character vector")
expect_error(species_code(c("anhinga novaehollandiae", "anhinga anhinga")), "length\\(sciname\\) not equal to 1")
expect_error(species_code("Anhinga fakei"), "No species in eBird taxonomy with matching scientific name.")
})


0 comments on commit 3f01167

Please sign in to comment.