tests/testthat/test-config.R

context("set_rhdx_config")

test_that("create_rhdx_config must returns a Configuration object", {
  expect_is(create_rhdx_config(), "HDXConfig")
})

test_that("Set configuration on the wrong server", {
  skip_on_cran()
  expect_error(set_rhdx_config(hdx_site = "fake"))
})

test_that("API key must be valid i.e uuid", {
  skip_on_cran()
  expect_error(set_rhdx_config(hdx_key = "abcdefd"))
})
dickoa/rhdx documentation built on Oct. 13, 2021, 8:36 p.m.