Skip to content

Commit

Permalink
test: add test for nested table identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
mcanouil committed Apr 16, 2024
1 parent 47fea7c commit 8b229cf
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/testthat/test-dplyr.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ test_that("can work with literal SQL", {
expect_true("fips_code" %in% dbplyr::op_vars(x))
})

test_that("can work with nested table identifier", {
con_us <- DBI::dbConnect(
bigquery(),
project = "bigquery-public-data",
billing = bq_test_project()
)

expect_s3_class(dplyr::collect(head(dplyr::tbl(con_us, I("utility_us.country_code_iso")))), "tbl_df")
expect_error(dplyr::collect(head(dplyr::tbl(con_us, "utility_us.country_code_iso"))), "tbl_df")
})

test_that("can copy_to", {
ds <- bq_test_dataset()
con <- DBI::dbConnect(ds)
Expand Down

0 comments on commit 8b229cf

Please sign in to comment.