tests/testthat/helper_db.R

# See .travis.yml on how to set up the testing DBs
can_con <- function(x) {
    inherits(x, "PostgreSQLConnection")
}
conn_empty <- NULL
testthat::test_that("check utils", {
    testthat::skip_on_cran()
    testthat::expect_false(can_con(conn_empty))
    }
)
try(conn_empty <- RPostgreSQL::dbConnect(RPostgreSQL::PostgreSQL(),
                                   dbname = "rpglt_empty"))

conn_data <- NULL
testthat::test_that("check utils", {
    testthat::skip_on_cran()
    testthat::expect_false(can_con(conn_data))
})
try(conn_data <- RPostgreSQL::dbConnect(RPostgreSQL::PostgreSQL(),
                                         dbname = "rpglt_data"))

Try the rpostgisLT package in your browser

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

rpostgisLT documentation built on May 2, 2019, 3:04 a.m.