tests/testthat/test-finbif_collections.R

suppressMessages(insert_cassette("finbif_collections"))

test_that(
  "returns valid data", {

    skip_on_cran()

    expect_s3_class(
      finbif_collections(taxonomic_coverage == "Coleoptera"), "data.frame"
    )
    expect_s3_class(
      finbif_collections(subcollections = FALSE, supercollections = TRUE),
      "data.frame"
    )
    expect_s3_class(
      finbif_collections(select = NA, nmin = NA), "data.frame"
    )

  }
)

test_that(
  "returns errors appropriately", {

    skip_on_cran()

    expect_condition(finbif_collections(1:50))

  }
)

suppressMessages(eject_cassette("finbif_collections"))

Try the finbif package in your browser

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

finbif documentation built on Jan. 3, 2022, 5:09 p.m.