tests/testthat/test-2_api_state.R

test_that("set a Telraam token", {
  expect_error(set_telraam_token())
  set_telraam_token('test')
  expect_equal(get_telraam_token(),'test')
})

test_that("call API with a wrong token", {
  set_telraam_token('test')
  expect_false(get_api_state())
})

Try the telraamStats package in your browser

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

telraamStats documentation built on May 29, 2024, 10:08 a.m.