tests/testthat/test-10-vald_default_endpoints.R

# Test that deleting the config file still results in endpoints still working as intended
test_that("End points work without config file", {
  # Creds
  reset_credentials()
  set_start_date(Sys.getenv("start_date"))
  
  # Clear the config file
  clear_config_file()
  
  # Make a call
  x <- get_profiles_only()
  
  # Expect that everything works just fine
  expect_gt(dim(x)[1], 0)
  expect_equal(dim(x)[2], 6)
})

Try the valdr package in your browser

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

valdr documentation built on April 22, 2026, 9:08 a.m.