Nothing
test_that("Test offline", {
skip_on_cran()
skip_if_siane_offline()
options(mapspain_test_offline = TRUE)
expect_message(
n <- esp_siane_bulk_download(update_cache = TRUE),
"Offline"
)
expect_null(n)
options(mapspain_test_offline = FALSE)
})
test_that("Test 404", {
skip_on_cran()
skip_if_siane_offline()
options(mapspain_test_404 = TRUE)
expect_message(
n <- esp_siane_bulk_download(update_cache = TRUE),
"Error"
)
expect_null(n)
options(mapspain_test_404 = FALSE)
})
test_that("Online", {
skip_on_cran()
skip_if_siane_offline()
cdir <- file.path(tempdir(), "testthat", "bulk")
if (dir.exists(cdir)) {
unlink(cdir, force = TRUE, recursive = TRUE)
}
s <- esp_siane_bulk_download(cache_dir = cdir)
expect_true(all(file.exists(s)))
expect_message(s <- esp_siane_bulk_download(cache_dir = cdir, verbose = TRUE))
if (dir.exists(cdir)) {
unlink(cdir, force = TRUE, recursive = TRUE)
}
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.