Skip to content

Commit

Permalink
add test to montior ard structure. rename group 1 into "variable"
Browse files Browse the repository at this point in the history
  • Loading branch information
ayogasekaram committed Aug 23, 2024
1 parent 912d2e2 commit ae3a5b7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion R/ard_stats_poisson_test.R
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ ard_stats_poisson_test <- function(data, numerator, denominator, na.rm = TRUE, b

if (!is_empty(by)) {
ret <- ret |>
dplyr::mutate(group1 = by)
dplyr::mutate(variable = by)
}

# add the stat label ---------------------------------------------------------
Expand Down
7 changes: 7 additions & 0 deletions tests/testthat/test-ard_stats_poisson_test.R
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,10 @@ test_that("ard_stats_poisson_test() errors are handled correctly", {
error = TRUE
)
})

test_that("ard_stats_poisson_test() follows ard structure", {
expect_silent(
ard_stats_poisson_test(cards::ADTTE, numerator = CNSR, denominator = AVAL)|>
cards::check_ard_structure(method = T)
)
})

0 comments on commit ae3a5b7

Please sign in to comment.