tests/testthat/test-download_data.R

test_that("downloading file returns GET response", {
  url <- "https://httpbin.org/anything"
  tmp <- tempfile()
  res <- download_file_httr2(url, filepath = tmp)
  unlink(tmp)

  res |> testthat::expect_s3_class("httr2_response")
})
prio-data/priogrid documentation built on June 14, 2025, 11:06 p.m.