tests/testthat/test-getFailures.R

test_that("getFailures function returns a data frame", {
  df <- getFailures(c("CERT","NAME","FAILDATE"), range = c("2015","2021"), limit = 1000)
  expect_is(df, "data.frame")
  expect_equal(ncol(df), 3)
})

test_that("getFailures function returns NULL if range is not in the correct format", {
  expect_error(getFailures(c("CERT","NAME","FAILDATE"), range = c("2015","2021","2022"), limit = 1000))
})

Try the fdicdata package in your browser

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

fdicdata documentation built on Sept. 12, 2024, 5:08 p.m.