tests/testthat/test-opencage_check.R

library("opencage")
context("opencage_check")
test_that("opencage_check returns error if wrong API",{
  skip_on_cran()
  expect_error(opencage_reverse(latitude = 0, longitude = 0,
                                key = "clearlynotakey"),
               "HTTP failure: 403")
})

Try the opencage package in your browser

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

opencage documentation built on Jan. 20, 2018, 9:20 a.m.