Skip to content

Commit

Permalink
Tweak tests
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr committed Aug 31, 2021
1 parent ca1631c commit 2a2f602
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/testthat/test-rows-db.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ test_that("insert + delete + truncate", {
rows_truncate(data, in_place = TRUE)
data %>% arrange(select)
})
})

test_that("insert + delete + truncate with returning argument (#607)", {
skip_if_src("duckdb")

if (identical(my_db_test_src(), sqlite_test_src())) {
skip_if_not_installed("RSQLite", "2.2.8")
}

data <- test_db_src_frame(select = 1:3, where = letters[c(1:2, NA)], exists = 0.5 + 0:2)

Expand Down Expand Up @@ -78,6 +86,14 @@ test_that("update", {
rows_update(data, test_db_src_frame(select = 0L, where = "a"), by = "where", in_place = TRUE)
data %>% arrange(select)
})
})

test_that("update with returning argument (#607)", {
skip_if_src("duckdb")

if (identical(my_db_test_src(), sqlite_test_src())) {
skip_if_not_installed("RSQLite", "2.2.8")
}

data <- test_db_src_frame(select = 1:3, where = letters[c(1:2, NA)], exists = 0.5 + 0:2)
expect_equal(
Expand Down

0 comments on commit 2a2f602

Please sign in to comment.