tests/testthat/test-updates.R

test_that("fred_updates returns expected structure", {
  skip_if(Sys.getenv("FRED_API_KEY") == "", "FRED_API_KEY not set")

  df <- fred_updates(limit = 5)
  expect_s3_class(df, "data.frame")
  expect_true(nrow(df) > 0)
})

Try the fred package in your browser

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

fred documentation built on March 19, 2026, 5:09 p.m.