tests/testthat/test_rcatfish_collections.R

#Test that rcatfish_collections returns proper collection information.


test_that("Test that rcatfish_collections returns proper collection information",{
  GetCollection <-try(rcatfish_collections(query = NULL, abbreviation = "UMMZ", country = NULL))
  if ("try-error"%in%class(GetCollection)) {
    skip("could not connect to remote database")
  }else{
    expect_equal(unlist(GetCollection$Name), "University of Michigan Museum of Zoology, Ann Arbor, Michigan, U.S.A.")
    expect_equal(unlist(GetCollection$Country), "U.S.A.")
  }
})

Try the rcatfish package in your browser

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

rcatfish documentation built on Feb. 3, 2026, 5:07 p.m.