Skip to content

Commit

Permalink
en test til
Browse files Browse the repository at this point in the history
  • Loading branch information
arnfinn committed Jan 9, 2025
1 parent b440997 commit fb26fd7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/testthat/test-auto-report-functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,17 @@ test_that("Terminate date is before today, and will return terminateDate + 1", {
), "Tuesday 7. January 2025")
})

test_that("Terminate date is after today but before next in range, and will return terminateDate + 1", {
expect_equal(
findNextRunDate(
startDate = seq(as.Date(Sys.Date()), length = 2, by = "-24 months")[2], # 24 months back in time
terminateDate = Sys.Date() + 14,
interval = "months",
target = "db"
), format(Sys.Date() + 15, format = "%A %e. %B %Y"))
})


test_that("Start date is after today, and will return start date", {
expect_equal(
findNextRunDate(
Expand Down

0 comments on commit fb26fd7

Please sign in to comment.