skip_if_not_installed("httptest2")
skip_if(over_gh_limit(), "Github rate limit not sufficient")
wood_clear_cache()
# SETUP ----
httptest2::with_mock_api({
gglgbtq_latest <- wood_github_latest("gglgbtq", "turtletopia")
})
# TESTS ----
test_version(gglgbtq_latest)
test_cache({ wood_github_latest("gglgbtq", "turtletopia") }, gglgbtq_latest)
test_param_package(wood_github_latest(package = "gglgbtq", user = "turtletopia"))
test_param_gh_user(wood_github_latest(package = "gglgbtq", user = "turtletopia"))
skip_if_offline()
test_that("raises an exception if package not available", {
expect_error(
wood_github_latest("fakepackage", "turtletopia"),
"Can't find repository `turtletopia/fakepackage` on Github.",
fixed = TRUE
)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.