test_that("gh_token() works", {
skip_on_cran()
pat <- Sys.getenv("GITHUB_PAT")
Sys.setenv("GITHUB_PAT" = "")
expect_null(gh_token())
Sys.setenv("GITHUB_PAT" = " ")
expect_null(gh_token())
Sys.setenv("GITHUB_PAT" = "abc")
expect_null(gh_token())
Sys.setenv("GITHUB_PAT" = pat)
expect_null(names(gh_token(header = FALSE)))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.