tests/testthat/test-season-year.R

context('season-year')

test_that('test output of season_year', {
  require(lubridate)
  x <- dmy("1/12/2015") + months(0:12)
  object <- season_year(x)
  expected <- c(2016, 2016, 2016, 2016, 2016, 2016, 2016, 2016, 2016, 2016,
                2016, 2016, 2017)

  expect_equal(object, expected)
})
camroach87/myhelpr documentation built on May 13, 2019, 11:03 a.m.