diff --git a/tests/testthat/test-db-helpers.R b/tests/testthat/test-db-helpers.R index ee42bc805..f22ea8258 100644 --- a/tests/testthat/test-db-helpers.R +++ b/tests/testthat/test-db-helpers.R @@ -70,15 +70,15 @@ test_that("DB helpers work for MSSQL", { DBI::Id(catalog = "db_helpers_db", schema = "schema_db_helpers_2", table = "test_db_helpers_4") ) expect_identical( - get_src_tbl_names(my_test_src(), schema = c("dbo", "schema_db_helpers"))[["dbo.test_db_helpers_2"]], + get_src_tbl_names(my_test_src(), schema = c("dbo", "schema_db_helpers"), names_pattern = "{.schema}.{.table}")[["dbo.test_db_helpers_2"]], DBI::Id(schema = "dbo", table = "test_db_helpers_2") ) expect_identical( - get_src_tbl_names(my_test_src(), schema = c("dbo", "schema_db_helpers"))[["schema_db_helpers.test_db_helpers_2"]], + get_src_tbl_names(my_test_src(), schema = c("dbo", "schema_db_helpers"), names_pattern = "{.schema}.{.table}")[["schema_db_helpers.test_db_helpers_2"]], DBI::Id(schema = "schema_db_helpers", table = "test_db_helpers_2") ) expect_warning( - out <- get_src_tbl_names(my_test_src(), schema = c("dbo", "schema_db_helpers"), names = "{.table}")["test_db_helpers_2"], + out <- get_src_tbl_names(my_test_src(), schema = c("dbo", "schema_db_helpers"), names_pattern = "{.table}")["test_db_helpers_2"], 'Local name test_db_helpers_2 will refer to <"dbo"."test_db_helpers_2">, rather than to <"schema_db_helpers"."test_db_helpers_2">', fixed = TRUE ) @@ -90,7 +90,7 @@ test_that("DB helpers work for MSSQL", { )) ) expect_warning( - out <- get_src_tbl_names(my_test_src(), schema = c("schema_db_helpers", "dbo"), names = "{.table}")["test_db_helpers_2"], + out <- get_src_tbl_names(my_test_src(), schema = c("schema_db_helpers", "dbo"), names_pattern = "{.table}")["test_db_helpers_2"], 'Local name test_db_helpers_2 will refer to <"schema_db_helpers"."test_db_helpers_2">, rather than to <"dbo"."test_db_helpers_2">', fixed = TRUE ) @@ -145,15 +145,15 @@ test_that("DB helpers work for Postgres", { DBI::Id(schema = "schema_db_helpers", table = "test_db_helpers_2") ) expect_identical( - get_src_tbl_names(my_test_src(), schema = c("public", "schema_db_helpers"))["public.test_db_helpers_2"][[1]], + get_src_tbl_names(my_test_src(), schema = c("public", "schema_db_helpers", names_pattern = "{.schema}.{.table}"))["public.test_db_helpers_2"][[1]], DBI::Id(schema = "public", table = "test_db_helpers_2") ) expect_identical( - get_src_tbl_names(my_test_src(), schema = c("public", "schema_db_helpers"))["schema_db_helpers.test_db_helpers_2"][[1]], + get_src_tbl_names(my_test_src(), schema = c("public", "schema_db_helpers", names_pattern = "{.schema}.{.table}"))["schema_db_helpers.test_db_helpers_2"][[1]], DBI::Id(schema = "schema_db_helpers", table = "test_db_helpers_2") ) expect_warning( - out <- get_src_tbl_names(my_test_src(), schema = c("public", "schema_db_helpers"), names = "{.table}")["test_db_helpers_2"], + out <- get_src_tbl_names(my_test_src(), schema = c("public", "schema_db_helpers"), names_pattern = "{.table}")["test_db_helpers_2"], 'Local name test_db_helpers_2 will refer to <"public"."test_db_helpers_2">, rather than to <"schema_db_helpers"."test_db_helpers_2">', fixed = TRUE ) @@ -165,7 +165,7 @@ test_that("DB helpers work for Postgres", { )) ) expect_warning( - out <- get_src_tbl_names(my_test_src(), schema = c("schema_db_helpers", "public"), names = "{.table}")["test_db_helpers_2"], + out <- get_src_tbl_names(my_test_src(), schema = c("schema_db_helpers", "public"), names_pattern = "{.table}")["test_db_helpers_2"], 'Local name test_db_helpers_2 will refer to <"schema_db_helpers"."test_db_helpers_2">, rather than to <"public"."test_db_helpers_2">', fixed = TRUE )