context("test-chec-certified-user.R")
syn <- attempt_instantiate()
tryCatch(
attempt_login(syn),
error = function(e) {
print(glue::glue("Did not log into Synapse: {e$message}"))
}
)
Sys.setenv(R_CONFIG_ACTIVE = "testing")
test_that("check_certified_user returns check_pass if certified", {
skip_if_not(logged_in(syn = syn))
res <- check_certified_user("3384770", syn)
expect_true(inherits(res, "check_pass"))
})
test_that("check_certified_user returns check_fail if not certified", {
skip_if_not(logged_in(syn = syn))
res <- check_certified_user("3397446", syn)
expect_true(inherits(res, "check_fail"))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.