tests/testthat/test-configurable.R

test_that("Configuration settings work", {

  app <- Configurable$new()
  app$set_config("trial_config", hello = 1)
  expect_equal(app$config$trial_config$hello, 1)
  app$set_config("trial_config", hi = 2)
  expect_equal(app$config$trial_config$hello, 1)
  expect_equal(app$config$trial_config$hi, 2)
  app$set_config("trial_config", hello = NULL)
  expect_null(app$config$trial_config$hello)

})
tjpalanca/webtools documentation built on Dec. 23, 2021, 11 a.m.