tests/testthat/test_user_agent.R

message("\nTesting API user agent")

test_that("User agent is GitHub repo", {
  skip_on_cran()
  response <- get_response("/query/getCollectionValues",
                           query = list(format = "json",
                                        api_key = get_api_key()))
  expect_identical(response[["request"]][["options"]][["useragent"]], "https://github.com/pamelarussell/TCIApathfinder")
})

Try the TCIApathfinder package in your browser

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

TCIApathfinder documentation built on Sept. 21, 2019, 5:03 p.m.