From 93cd47c0cd29b2eee0953eeea89f4e39a773b3fa Mon Sep 17 00:00:00 2001 From: Kara Woo Date: Wed, 25 Feb 2026 09:33:19 -0800 Subject: [PATCH 1/3] add new API field --- R/ptype.R | 1 + tests/integrated/test-get.R | 5 +---- tests/integrated/test-lazy.R | 5 +---- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/R/ptype.R b/R/ptype.R index 5b5e1a0ec..df68cea68 100644 --- a/R/ptype.R +++ b/R/ptype.R @@ -15,6 +15,7 @@ connectapi_ptypes <- list( "active_time" = NA_datetime_, "confirmed" = NA, "locked" = NA, + "external_id" = NA_character_, "guid" = NA_character_ ), groups = tibble::tibble( diff --git a/tests/integrated/test-get.R b/tests/integrated/test-get.R index 08790c428..30e347f59 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 13febff09..36ee6627b 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", { From 8b09a27ce81d0926c6e5469b08e60244b1f4f023 Mon Sep 17 00:00:00 2001 From: Kara Woo Date: Wed, 25 Feb 2026 10:20:26 -0800 Subject: [PATCH 2/3] force logical --- R/ptype.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/ptype.R b/R/ptype.R index df68cea68..6e274f1eb 100644 --- a/R/ptype.R +++ b/R/ptype.R @@ -13,8 +13,8 @@ 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_ ), From 1a12eb1351701982aba030c0936fe7b78f53bdae Mon Sep 17 00:00:00 2001 From: Kara Woo Date: Wed, 25 Feb 2026 10:45:18 -0800 Subject: [PATCH 3/3] fix vanity URL swap test --- tests/integrated/test-deploy.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/integrated/test-deploy.R b/tests/integrated/test-deploy.R index 63471613d..15f42cb66 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) })