context("Database")
test_that("Database handle works correctly", {
db <- Database$new(tempdir())
db$execute("create table if not exists test (val INTEGER PRIMARY KEY)")
db$execute("insert into test values (1)")
val <- db$fetch("select val from test")
expect_equal(val[[1]], 1)
db$destroy()
expect_error(db$fetch("select val from test"))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.