tests/testthat/test-auth.R

test_that("get_api_key", {
  withr::with_envvar(c(DELPHI_EPIDATA_KEY = "epidata_key_from_envvar"), {
    expect_identical(get_api_key(), "epidata_key_from_envvar")
  })
})

Try the epidatr package in your browser

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

epidatr documentation built on June 22, 2024, 9:15 a.m.