context("test-api-interaction.R")
test_that("API-requests work", {
res <- api_request()
expect_is(res$result, "character")
expect_equal(res$result, "success")
expect_is(res$data, "list")
expect_error(api_request(url = "google.com"))
expect_error(api_request(url = "", apikey = ""))
expect_error(api_request(url = "http://example.com/hello"))
expect_error(api_request(cmd = "poopybutthole"))
})
test_that("Arnold... works?", {
res <- arnold()
expect_is(res, "character")
expect_length(res, 1)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.