tests/testthat/test-is_init_param.R

context("is_init_param")

test_that("use", {

  testthat::expect_false(beautier:::is_init_param(create_alpha_param(id = NA)))
  testthat::expect_true(beautier:::is_init_param(create_alpha_param(id = 1)))
})

test_that("abuse", {

  testthat::expect_error(
    beautier:::is_init_param("nonsense"),
    "'x' must be a parameter"
  )

})
ropensci/beautier documentation built on March 12, 2019, 8:27 p.m.