tests/testthat/test-get_history.R

test_that("get_history() returns a tibble", {
  skip_if(no_creds_available())
  result <- get_history(filters = "CERT:10002")
  expect_s3_class(result, "tbl_df")
  expect_gt(nrow(result), 0)
})

test_that("get_history() respects the fields argument", {
  skip_if(no_creds_available())
  fields <- c("CERT", "CHANGECODE", "CHANGECODE_DESC", "PROCDATE")
  result <- get_history(filters = "CERT:10002", fields = fields)
  expect_setequal(names(result), c("ID", fields))
})

Try the fdic package in your browser

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

fdic documentation built on Sept. 12, 2026, 5:09 p.m.