tests/testthat/test-pbdb_taxonomic_functions.R

data <- readRDS(test_path("fixtures", "canidae_quat_df.rds"))

test_that("pbdb_subtaxa() returns a data frame", {
  df <- pbdb_subtaxa(data, do_plot = FALSE)
  ns <- c("species", "genera", "families", "orders", "classes", "phyla")
  expect_s3_class(df, "data.frame")
  expect_identical(names(df), ns)
})
ropensci/paleobioDB documentation built on March 5, 2024, 3:08 a.m.