@@ -81,21 +81,20 @@ test_that("fetch_tbl warns on non-success", {
8181 .package = " httr"
8282 )
8383 # TODO: Turn these tests back on, when the API is fully online
84- # Remove on 2023-06-21
85- # artificial_warning <- "* This is a warning with a leading asterisk and {braces} to make sure we don't have bulleting/glue bugs."
86- # debug_triplet <- readRDS(testthat::test_path("data/test-classic.rds")) %>%
87- # jsonlite::fromJSON() %>%
88- # `[[<-`("message", artificial_warning)
89- # local_mocked_bindings(
90- # # see generation code above
91- # fromJSON = function(...) debug_triplet,
92- # .package = "jsonlite"
93- # )
84+ artificial_warning <- " * This is a warning with a leading asterisk and {braces} to make sure we don't have bulleting/glue bugs."
85+ debug_triplet <- readRDS(testthat :: test_path(" data/test-classic.rds" )) %> %
86+ jsonlite :: fromJSON() %> %
87+ `[[<-`(" message" , artificial_warning )
88+ local_mocked_bindings(
89+ # see generation code above
90+ fromJSON = function (... ) debug_triplet ,
91+ .package = " jsonlite"
92+ )
9493
95- # expect_warning(epidata_call %>% fetch_tbl(),
96- # regexp = paste0("epidata warning: ", artificial_warning),
97- # fixed = TRUE
98- # )
94+ expect_warning(epidata_call %> % fetch_tbl(),
95+ regexp = paste0(" epidata warning: " , artificial_warning ),
96+ fixed = TRUE
97+ )
9998})
10099
101100test_that(" classic only fetch" , {
0 commit comments