tests/testthat/test-rEHR_functions.R

###
### rEHR functions
###
test_that("check connect_database", {

  ### Open connection
  aurum_extract <- connect_database(file.path(tempdir(), "temp.sqlite"))

  ### Check answer is same whether stabilisation used or not
  expect_true(inherits(aurum_extract, "DBIConnection"))

  ## clean up
  RSQLite::dbDisconnect(aurum_extract)
  unlink(file.path(tempdir(), "temp.sqlite"))

})

Try the rcprd package in your browser

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

rcprd documentation built on April 12, 2025, 1:57 a.m.