diff --git a/tests/testthat/test-arc2.R b/tests/testthat/test-arc2.R index 3edb4064..38a3bb54 100644 --- a/tests/testthat/test-arc2.R +++ b/tests/testthat/test-arc2.R @@ -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") })