tests/testthat/test_createGADS.R

# load test data
# load(file = "tests/testthat/helper_data.rda")
load(file = "helper_data.rda")
allList <- mergeLabels(df1 = df1, df2 = df2)


### create
test_that("GADS DB creation", {
  expect_message(createGADS(allList = allList, pkList = pkList, fkList = fkList, filePath = ":memory:"),
                 "filePath points to work memory")
  expect_message(createGADS(allList = df1, pkList = list(df1 = "ID1"), filePath = ":memory:"),
                 "filePath points to work memory")
  expect_error(createGADS(allList = df1, pkList = "ID1", filePath = ":memory:"), "All input lists have to be named")
  expect_error(createGADS(allList = list(df1), pkList = list(df1 = "ID1"), filePath = ":memory:"))
})

Try the eatGADS package in your browser

Any scripts or data that you put into this service are public.

eatGADS documentation built on June 8, 2025, 12:42 p.m.