Nothing
token <- "wrong"
msg <- "Unauthorized (HTTP 401)"
q_url <- rcites_url(paste0("taxon_concepts/", tx_id, "/distributions.json"))
test_that("test token", {
old <- Sys.getenv("SPECIESPLUS_TOKEN")
suppressMessages({
on.exit(set_token(old))
expect_snapshot(set_token("hackme"))
expect_identical(rcites_getsecret(), "hackme")
expect_snapshot(forget_token())
expect_snapshot(set_token("!"))
expect_identical(rcites_getsecret(), "!")
})
})
# test_that("caught wrong token", {
# vcr::use_cassette("wrong_token", {
# expect_warning(res <- rcites_res(q_url, token, FALSE, TRUE),
# class = "http_401"
# )
# }, match_requests_on = "headers")
# })
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.