Skip to content

Commit

Permalink
add standard project types to gantt_verify tests
Browse files Browse the repository at this point in the history
  • Loading branch information
giocomai committed Jan 26, 2024
1 parent 4c0618c commit 16365cb
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions tests/testthat/test-gantt_verify.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,30 @@ test_that("NAs are caught by gantt_verify", {
expected = 1L
)
})


test_that("Standard inputs are returned correctly", {
expect_equal(
object = ganttrify::gantt_verify(ganttrify::test_project),
expected = tibble::as_tibble(ganttrify::test_project)
)

expect_equal(
object = ganttrify::gantt_verify(ganttrify::test_project_date_month,
by_date = TRUE
),
expected = tibble::as_tibble(ganttrify::test_project_date_month)
)

expect_equal(
object = ganttrify::gantt_verify(ganttrify::test_project_date_day,
by_date = TRUE,
exact_date = TRUE
),
expected = tibble::as_tibble(ganttrify::test_project_date_day %>%
dplyr::mutate(
start_date = lubridate::as_date(start_date),
end_date = lubridate::as_date(end_date)
))
)
})

0 comments on commit 16365cb

Please sign in to comment.