tests/testthat/test-levels.R

context("retrieving levels")

test_that("levels in taxlist object", {
  expect_equal(
    levels(Easplist),
    base::levels(Easplist@taxonRelations$Level)
  )
  expect_equal(length(levels(Easplist)) < {
    levels(Easplist) <- c(levels(Easplist), "phylum")
    length(levels(Easplist))
  }, TRUE)
})
ropensci/taxlist documentation built on Sept. 17, 2024, 3:39 p.m.