Skip to content

Commit

Permalink
fix test when single validationDesign created
Browse files Browse the repository at this point in the history
  • Loading branch information
egillax committed Oct 7, 2024
1 parent 3470a1e commit 00c07ef
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tests/testthat/test-validation.R
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ test_that("createValidationDesign works with minimal required arguments", {
expect_equal(design$plpModelList, plpModelList)
})

test_that("createValidationDesign works with all arguments", {
test_that("single createValidationDesign works with all arguments", {
targetId <- 1
outcomeId <- 2
plpModelList <- list("model1", "model2")
Expand All @@ -155,14 +155,14 @@ test_that("createValidationDesign works with all arguments", {
recalibrate = recalibrate,
runCovariateSummary = runCovariateSummary
)
expect_s3_class(design[[1]], "validationDesign")
expect_equal(design[[1]]$targetId, targetId)
expect_equal(design[[1]]$outcomeId, outcomeId)
expect_equal(design[[1]]$plpModelList, plpModelList)
expect_equal(design[[1]]$populationSettings, populationSettings)
expect_equal(design[[1]]$restrictPlpDataSettings, restrictPlpDataSettings[[1]])
expect_equal(design[[1]]$recalibrate, recalibrate)
expect_equal(design[[1]]$runCovariateSummary, runCovariateSummary)
expect_s3_class(design, "validationDesign")
expect_equal(design$targetId, targetId)
expect_equal(design$outcomeId, outcomeId)
expect_equal(design$plpModelList, plpModelList)
expect_equal(design$populationSettings, populationSettings)
expect_equal(design$restrictPlpDataSettings, restrictPlpDataSettings)
expect_equal(design$recalibrate, recalibrate)
expect_equal(design$runCovariateSummary, runCovariateSummary)
})

test_that("createValidationDesigns correctly handles multiple restrictSettings", {
Expand Down

0 comments on commit 00c07ef

Please sign in to comment.