Skip to content

Commit

Permalink
silence messages during testing
Browse files Browse the repository at this point in the history
  • Loading branch information
PietrH committed Jul 14, 2023
1 parent 2c9e2b9 commit 8043218
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/testthat/test-check_species.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,19 @@ test_that("Multiput scientific names are allowed", {

test_that("Function works with vernacular names", {
vn_names <- c("beech marten", "mallard")
species <- check_species(mica, vn_names)
species <- suppressMessages(check_species(mica, vn_names))
testthat::expect_equal(species, c("Martes foina", "Anas platyrhynchos"))
})

test_that("Functions works well with vernacular names of different languages", {
vn_names <- c("beech marten", "wilde eend")
species <- check_species(mica, vn_names)
species <- suppressMessages(check_species(mica, vn_names))
testthat::expect_equal(species, c("Martes foina", "Anas platyrhynchos"))
})

test_that("Functions works with a mix of scientific and vernacular names", {
mixed_names <- c("mallard", "steenmarter", "Castor fiber")
species <- check_species(mica, mixed_names)
species <- suppressMessages(check_species(mica, mixed_names))
testthat::expect_equal(
species,
c(
Expand All @@ -69,7 +69,7 @@ test_that("Taxon IDs are not allowed", {
})

test_that("Functions works case insensitively", {
vn_name <- check_species(mica, c("MallARD"))
vn_name <- suppressMessages(check_species(mica, c("MallARD")))
species <- check_species(mica, vn_name)
testthat::expect_equal(species, "Anas platyrhynchos")
})
Expand Down

0 comments on commit 8043218

Please sign in to comment.