tests/testthat/test-update_forecast_towns.R

 context("update_forecast_locations")

 # Timeout options are reset on update_forecast_locations() exit ---------------
 test_that("Timeout options are reset on update_forecast_towns() exit", {
   skip_on_cran()
   update_forecast_towns()
   expect_equal(options("timeout")[[1]], 60)
 })

 # update_forecast_locations() downloads and imports the proper file -----------
 test_that("update_forecast_towns() downloads and imports proper file", {
   skip_on_cran()
   update_forecast_towns()
   AAC_codes <- NULL
   load(system.file("extdata", "AAC_codes.rda", package = "bomrang"))
   expect_equal(ncol(AAC_codes), 5)
   expect_named(AAC_codes, c("AAC", "PT_NAME", "LON", "LAT", "ELEVATION"))
 })

Try the bomrang package in your browser

Any scripts or data that you put into this service are public.

bomrang documentation built on Dec. 15, 2017, 9:05 a.m.