Skip to content

Commit

Permalink
DS-3488 Add more unit tests [revdep skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
jrwishart committed Aug 25, 2021
1 parent 19a57c3 commit 2956841
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/testthat/test-checks.R
Original file line number Diff line number Diff line change
Expand Up @@ -163,4 +163,11 @@ test_that("DS-3488 Check dummy variable adjustment handled with and without outl

expect_equal(CheckPredictionVariables(output, newdata = dummy.adj.model),
expected.output)
# Check method still works when formula not available
output[["formula"]] <- NULL
output[["outcome.name"]] <- "Y"
output[["model"]] <- missing.all.predictors
expected.output <- missing.all.predictors[-1, -1]
expect_equal(CheckPredictionVariables(output, newdata = dummy.adj.model),
dummy.adj.model[, c("X1", "X2")])
})

0 comments on commit 2956841

Please sign in to comment.