Skip to content

Commit

Permalink
fix #294 fix to arc2 test - us Sys.Date to get last year, instead of …
Browse files Browse the repository at this point in the history
…hard coding
  • Loading branch information
sckott committed Jan 3, 2019
1 parent f65d924 commit 102154d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/testthat/test-arc2.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ test_that("arc2 returns the expected output", {

test_that("arc2 fails with appropriate error messages", {
expect_error(arc2(date = 19830101), "must be of class character, Date")
expect_error(arc2(date = "1978-01-01"), "must be between 1979 and 2018")
expect_error(arc2(date = "1978-01-01"),
paste0("must be between 1979 and ", format(Sys.Date(), "%Y")))
expect_error(arc2(date = "1983-13-01"), "must be between 1 and 12")
expect_error(arc2(date = "1983-01-32"), "must be between 1 and 31")
})

0 comments on commit 102154d

Please sign in to comment.