Skip to content

Commit

Permalink
typo
Browse files Browse the repository at this point in the history
  • Loading branch information
catalamarti committed Nov 1, 2024
1 parent ba091a1 commit d248cc8
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions tests/testthat/test-padCohortDate.R
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,8 @@ test_that("test indexes - postgres", {
CDMConnector::cdm_disconnect(cdm = cdm)
})

test_taht("test ", {
cdm <- omock::mockCdmFromTables(tables = list(
test_that("test padCohortDate", {
cdm <- omock::mockCdmFromTables(tables = list(
cohort = dplyr::tibble(
cohort_definition_id = 1L,
subject_id = c(1L, 2L),
Expand All @@ -351,8 +351,8 @@ test_taht("test ", {
days = c(5, 8)
)
))
cdm <- cdm |>
copyCdm()

cdm <- copyCdm(cdm)

expect_no_error(
cdm$my_cohort <- cdm$cohort |>
Expand All @@ -365,4 +365,17 @@ test_taht("test ", {
)
)

expect_identical(
cdm$my_cohort |>
dplyr::filter(subject_id == 1) |>
dplyr::pull("cohort_end_date"),
as.Date("2020-01-08")
)
expect_identical(
cdm$my_cohort |>
dplyr::filter(subject_id == 2) |>
dplyr::pull("cohort_end_date"),
as.Date("2020-01-11")
)

})

0 comments on commit d248cc8

Please sign in to comment.