tests/testthat/test-prepareConnection.R

library(datrProfile)
context("Prepare Connection")

test_that("prepareConnection", {
  conn.info <- list(odbc.driver = odbc::odbc(),
                    db.host = "host",
                    db.name = NULL,
                    db.encoding = "",
                    dsn = NULL,
                    user = "myuser",
                    passwd = "mypasswd")
  class(conn.info) <- "teradata"
  expect_equal(prepareConnection(db.vendor = "teradata",
                                 db.host = "host",
                                 user = "myuser",
                                 passwd = "mypasswd"), conn.info)
})

Try the datrProfile package in your browser

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

datrProfile documentation built on Aug. 2, 2019, 5:05 p.m.