diff --git a/R/ptype.R b/R/ptype.R index 5b5e1a0e..6e274f1e 100644 --- a/R/ptype.R +++ b/R/ptype.R @@ -13,8 +13,9 @@ connectapi_ptypes <- list( "created_time" = NA_datetime_, "updated_time" = NA_datetime_, "active_time" = NA_datetime_, - "confirmed" = NA, - "locked" = NA, + "confirmed" = FALSE, + "locked" = FALSE, + "external_id" = NA_character_, "guid" = NA_character_ ), groups = tibble::tibble( diff --git a/tests/integrated/test-deploy.R b/tests/integrated/test-deploy.R index 63471613..15f42cb6 100644 --- a/tests/integrated/test-deploy.R +++ b/tests/integrated/test-deploy.R @@ -315,10 +315,11 @@ test_that("swap_vanity_urls works", { # works with just one vanity url (content_b) delete_vanity_url(tmp_content_a) expect_null(get_vanity_url(tmp_content_a)) + set_vanity_url(tmp_content_b, tmp_content_b_name) swap_res3 <- swap_vanity_urls(tmp_content_a, tmp_content_b) - expect_identical(swap_res3$content_a, swap_res$content_a) + expect_identical(swap_res3$content_a, paste0("/", tmp_content_b_name, "/")) expect_null(swap_res3$content_b) }) diff --git a/tests/integrated/test-get.R b/tests/integrated/test-get.R index 08790c42..30e347f5 100644 --- a/tests/integrated/test-get.R +++ b/tests/integrated/test-get.R @@ -10,10 +10,7 @@ test_that("get_users works", { users <- get_users(client) expect_s3_class(users, c("tbl_df", "tbl", "data.frame")) - expect_equal( - purrr::map_chr(vctrs::vec_ptype(users), typeof), - purrr::map_chr(vctrs::vec_ptype(connectapi_ptypes$users), typeof) - ) + expect_ptype_equal(users, connectapi_ptypes$users, exact = FALSE) # Other tests create users, so specifying the exact number here is conditional # on the contents of other tests and the order that tests run in. diff --git a/tests/integrated/test-lazy.R b/tests/integrated/test-lazy.R index 13febff0..36ee6627 100644 --- a/tests/integrated/test-lazy.R +++ b/tests/integrated/test-lazy.R @@ -35,10 +35,7 @@ test_that("users works", { expect_type(colnames(users), "character") expect_gt(length(colnames(users)), 1) - expect_equal( - purrr::map_chr(vctrs::vec_ptype(users_local), typeof), - purrr::map_chr(vctrs::vec_ptype(connectapi_ptypes$users), typeof) - ) + expect_ptype_equal(users_local, connectapi_ptypes$users, exact = FALSE) }) test_that("usage_static works", {