Nothing
context("groan image")
skip_on_cran()
x <- groan_image("GlGBIY0wAAd")
test_that("groan gets a joke as an image", {
expect_is(x, "array")
})
test_that("groan fails without internet", {
mockery::stub(groan_image, "curl::has_internet", FALSE)
expect_error(groan_image("GlGBIY0wAAd"))
})
test_that("groan fails when return type isn't as expected",{
mockery::stub(groan_image, "httr::http_type", "Knock, knock. Who's there? An incorrect API Response")
expect_error(groan_image("GlGBIY0wAAd"))
})
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.