tests/testthat/test_api.R

context('API error handling')

test_that('unavailable API yields informative error message', {
  expect_error({
    osem_boxes(endpoint = 'example.zip')
  }, 'The API at example.zip is currently not available')
})
sensebox/opensensmapR documentation built on March 12, 2023, 8:09 a.m.