context("Interacting with DB")
library(eatGADS)
load(file = "c:/Benjamin_Becker/02_Repositories/packages/eatGADS/tests/testthat/helper_dbdata.rda")
### names
test_that("Names are extracted correctly", {
expected <- list(df1 = c("v1", "ID2"), df2 = c("ID2", "v2"))
expect_identical(dbNames(filePath = "helper_dataBase.db"), expected)
})
### keys
test_that("Keys are extracted correctly", {
keys <- dbKeys(filePath = "helper_dataBase.db")
expect_equal(keys$pkList, pkList[sort(names(pkList))])
expect_equal(keys$fkList, fkList[sort(names(fkList))])
})
### Labels
test_that("Labels are extracted correctly", {
expect_equal(dbLabels(filePath = "helper_dataBase.db"), expected_labels)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.