Skip to content

Commit

Permalink
#44 add table and col names test
Browse files Browse the repository at this point in the history
  • Loading branch information
ginberg committed May 30, 2023
1 parent 1b88bc3 commit b363903
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/testthat/test-basic.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,17 @@ test_that("Connect", {
DatabaseConnector::disconnect(connection)
})

test_that("Table names and column names case", {
connection <- DatabaseConnector::connect(getEunomiaConnectionDetails())
tableNames <- DatabaseConnector::getTableNames(connection)
expect_true(identical(tableNames, tolower(tableNames)))

for (tableName in tableNames) {
colNames <- DatabaseConnector::dbListFields(connection, tableName)
expect_true(identical(colNames, tolower(colNames)))
}
})

test_that("Query", {
connection <- DatabaseConnector::connect(getEunomiaConnectionDetails())
personCount <- DatabaseConnector::querySql(connection, "SELECT COUNT(*) FROM main.person;")
Expand Down

0 comments on commit b363903

Please sign in to comment.