tests/testthat/test-occCitePrint.R

library(occCite)
library(ape)

data(myOccCiteObject)
mySimpleOccCiteObject <- myOccCiteObject
myOccCitations <- occCitation(mySimpleOccCiteObject)

test_that("regular print", {
  output <- capture.output(print(myOccCitations))
  expect_equal(class(output), "character")
})

test_that("print by species", {
  output <- capture.output(print(myOccCitations, bySpecies = TRUE))
  expect_equal(class(output), "character")
})

Try the occCite package in your browser

Any scripts or data that you put into this service are public.

occCite documentation built on Nov. 5, 2025, 6:49 p.m.