2021-08-19 15:49:36 +00:00
|
|
|
test_that("createDdl works", {
|
2023-10-26 18:13:30 +00:00
|
|
|
for (cdmVersion in listSupportedVersions()) {
|
2021-08-19 15:49:36 +00:00
|
|
|
sql <- createDdl(cdmVersion)
|
|
|
|
expect_type(sql, "character")
|
|
|
|
expect_gt(nchar(sql), 10)
|
2023-10-26 18:13:30 +00:00
|
|
|
}
|
2021-08-19 15:49:36 +00:00
|
|
|
expect_error(createDdl(5.4))
|
|
|
|
expect_error(createDdl("blah"))
|
|
|
|
})
|
|
|
|
|
|
|
|
test_that("createPrimaryKeys works", {
|
2023-10-26 18:13:30 +00:00
|
|
|
for (cdmVersion in listSupportedVersions()) {
|
|
|
|
sql <- createPrimaryKeys(cdmVersion)
|
|
|
|
expect_type(sql, "character")
|
|
|
|
expect_gt(nchar(sql), 10)
|
|
|
|
}
|
2021-08-19 15:49:36 +00:00
|
|
|
expect_error(createPrimaryKeys(5.4))
|
|
|
|
expect_error(createPrimaryKeys("blah"))
|
|
|
|
})
|
|
|
|
|
|
|
|
test_that("createForeignKeys works", {
|
2023-10-26 18:13:30 +00:00
|
|
|
for (cdmVersion in listSupportedVersions()) {
|
|
|
|
sql <- createForeignKeys(cdmVersion)
|
|
|
|
expect_type(sql, "character")
|
|
|
|
expect_gt(nchar(sql), 10)
|
|
|
|
}
|
2021-08-19 15:49:36 +00:00
|
|
|
expect_error(createForeignKeys(5.4))
|
|
|
|
expect_error(createForeignKeys("blah"))
|
|
|
|
})
|