tests/testthat/test-test_get_daily_zipdata.R

test_that("does function get_daily_zipdata work?", {

  # retrieve some data from
  df <- get_daily_zipdata()

  # is it a dataframe?
  expect_true(is.data.frame(df))

  # correct number of cols?
  nr_of_cols <- length(colnames(df))
  expect_equal(41, nr_of_cols)

  # is the column encoded correctly?
  expect_true(lubridate::is.Date(df$YYYYMMDD))

})
Glender/DutchWeather documentation built on March 29, 2022, 10:08 p.m.