From 5a02dd0486d91f1cc63e4840f6f7de71ee80e606 Mon Sep 17 00:00:00 2001 From: mitchellmanware Date: Tue, 27 Aug 2024 13:14:57 -0400 Subject: [PATCH] extra URL test --- tests/testthat/test-download.R | 11 +++++++++++ 1 file changed, 11 insertions(+) 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", {