tests/testthat/test-function-determine_days_to_predict.R

test_that("determine_date_range() works", {

  f <- fhpredict:::determine_date_range

  date <- "2019-07-05"

  expect_identical(f(from = date), as.Date(date))
  expect_identical(f(to = date), as.Date(date))
  expect_identical(f(from = date, to = date), as.Date(date))
})
KWB-R/fhpredict documentation built on Nov. 1, 2020, 5:58 a.m.