tests/testthat/test-get_summary.R

test_that("get_summary() returns a tibble", {
  skip_if(no_creds_available())
  result <- get_summary(filters = "YEAR:2025")
  expect_s3_class(result, "tbl_df")
  expect_gt(nrow(result), 0)
})

test_that("get_summary() respects the fields argument", {
  skip_if(no_creds_available())
  fields <- c("YEAR", "BANKS", "ASSET")
  result <- get_summary(filters = "YEAR:2025", 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.