context("loadData") test_that("Bad input generates errors", { expect_error( airnow_loadLatest(parameter = "DUMMY") ) expect_error( airnow_loadLatest(archiveBaseUrl = NULL, dataDir = "/DUMMY") ) expect_error( airsis_loadLatest(parameter = "DUMMY") ) expect_error( airsis_loadLatest(archiveBaseUrl = NULL, dataDir = "/DUMMY") ) expect_error( wrcc_loadLatest(parameter = "DUMMY") ) expect_error( wrcc_loadLatest(archiveBaseUrl = NULL, dataDir = "/DUMMY") ) expect_error( monitor_loadLatest(parameter = "DUMMY") ) expect_error( monitor_loadLatest(archiveBaseUrl = NULL, dataDir = "/DUMMY") ) expect_error( airnow_loadDaily(parameter = "DUMMY") ) expect_error( airnow_loadDaily(archiveBaseUrl = NULL, dataDir = "/DUMMY") ) expect_error( airsis_loadDaily(parameter = "DUMMY") ) expect_error( airsis_loadDaily(archiveBaseUrl = NULL, dataDir = "/DUMMY") ) expect_error( wrcc_loadDaily(parameter = "DUMMY") ) expect_error( wrcc_loadDaily(archiveBaseUrl = NULL, dataDir = "/DUMMY") ) expect_error( monitor_loadDaily(parameter = "DUMMY") ) expect_error( monitor_loadDaily(archiveBaseUrl = NULL, dataDir = "/DUMMY") ) # On CRAN -- skip all internet based testing skip_on_cran() expect_error( airnow_loadLatest(archiveBaseUrl = "https://tools.airfire.org/DUMMY") ) expect_error( airsis_loadLatest(archiveBaseUrl = "https://tools.airfire.org/DUMMY") ) expect_error( wrcc_loadLatest(archiveBaseUrl = "https://tools.airfire.org/DUMMY") ) expect_error( airnow_loadDaily(archiveBaseUrl = "https://tools.airfire.org/DUMMY") ) expect_error( airsis_loadDaily(archiveBaseUrl = "https://tools.airfire.org/DUMMY") ) expect_error( wrcc_loadDaily(archiveBaseUrl = "https://tools.airfire.org/DUMMY") ) })