File: test-dbConnect.R

package info (click to toggle)
r-cran-rmariadb 1.3.3%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,588 kB
  • sloc: sql: 146,810; cpp: 1,666; ruby: 27; sh: 14; makefile: 2
file content (22 lines) | stat: -rw-r--r-- 531 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
test_that("Connecting with mysql = FALSE", {
  con <- mariadbForceDefault()
  on.exit(dbDisconnect(con))

  expect_s4_class(con, "MariaDBConnection")
  expect_false(is(con, "MySQLConnection"))
})

test_that("Connecting with mysql = TRUE", {
  con <- mysqlDefault()
  on.exit(dbDisconnect(con))

  expect_s4_class(con, "MariaDBConnection")
  expect_s4_class(con, "MySQLConnection")
})

test_that("Connecting with mysql unset", {
  con <- mariadbDefault()
  on.exit(dbDisconnect(con))

  expect_s4_class(con, "MariaDBConnection")
})