diff --git a/tests/testthat/test-download.R b/tests/testthat/test-download.R index fc7c3a8..62923e7 100644 --- a/tests/testthat/test-download.R +++ b/tests/testthat/test-download.R @@ -140,6 +140,17 @@ testthat::test_that("check_urls returns NULL undefined size.", { ) }) +testthat::test_that("check_urls handles size > length(urls)", { + urls <- paste0( + "https://satepsanone.nesdis.noaa.gov/pub/FIRE/web/HMS/Smoke_Polygons/", + "Shapefile/2023/09/hms_smoke20230901.zip" + ) + testthat::expect_no_error( + url_status <- check_urls(urls = urls, size = 10, method = "HEAD") + ) + testthat::expect_length(url_status, 1) +}) + ################################################################################ ##### download_sink testthat::test_that("download_sink", {