diff --git a/R/ard_stats_poisson_test.R b/R/ard_stats_poisson_test.R index 2654f860..e89f3ef0 100644 --- a/R/ard_stats_poisson_test.R +++ b/R/ard_stats_poisson_test.R @@ -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 --------------------------------------------------------- diff --git a/tests/testthat/test-ard_stats_poisson_test.R b/tests/testthat/test-ard_stats_poisson_test.R index 426e0d74..9901df9d 100644 --- a/tests/testthat/test-ard_stats_poisson_test.R +++ b/tests/testthat/test-ard_stats_poisson_test.R @@ -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) + ) +})