Skip to content

Commit

Permalink
updated tests due to different new_epidist argument defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwlambert committed Jun 5, 2023
1 parent 7d3ded1 commit c07e8f8
Showing 1 changed file with 25 additions and 5 deletions.
30 changes: 25 additions & 5 deletions tests/testthat/test-epidist.R
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,13 @@ test_that("new_epidist works with minimal viable input", {
ci_type = "confidence interval"
)
),
summary_stats = create_epidist_summary_stats(),
citation = "Smith (2002) <10.128372837>",
metadata = create_epidist_metadata(),
method_assess = create_epidist_method_assess(),
discretise = FALSE,
truncation = NA
truncation = NA,
notes = "No notes"
)

expect_s3_class(epidist_obj, class = "epidist")
Expand Down Expand Up @@ -342,9 +346,13 @@ test_that("validate_epidist passes when expected", {
ci_type = "confidence interval"
)
),
summary_stats = create_epidist_summary_stats(),
citation = "Smith (2002) <10.128372837>",
metadata = create_epidist_metadata(),
method_assess = create_epidist_method_assess(),
discretise = FALSE,
truncation = NA
truncation = NA,
notes = "No notes"
)

expect_silent(validate_epidist(epidist = epidist_obj))
Expand All @@ -371,9 +379,13 @@ test_that("validate_epidist catches class faults when expected", {
ci_type = "confidence interval"
)
),
summary_stats = create_epidist_summary_stats(),
citation = "Smith (2002) <10.128372837>",
metadata = create_epidist_metadata(),
method_assess = create_epidist_method_assess(),
discretise = FALSE,
truncation = NA
truncation = NA,
notes = "No notes"
)

epidist_obj$disease <- NULL
Expand Down Expand Up @@ -403,9 +415,13 @@ test_that("validate_epidist catches class faults when expected", {
ci_type = "confidence interval"
)
),
summary_stats = create_epidist_summary_stats(),
citation = "Smith (2002) <10.128372837>",
metadata = create_epidist_metadata(),
method_assess = create_epidist_method_assess(),
discretise = FALSE,
truncation = NA
truncation = NA,
notes = "No notes"
)

epidist_obj$disease$disease <- NULL
Expand Down Expand Up @@ -435,9 +451,13 @@ test_that("validate_epidist catches class faults when expected", {
ci_type = "confidence interval"
)
),
summary_stats = create_epidist_summary_stats(),
citation = "Smith (2002) <10.128372837>",
metadata = create_epidist_metadata(),
method_assess = create_epidist_method_assess(),
discretise = FALSE,
truncation = NA
truncation = NA,
notes = "No notes"
)

epidist_obj$epi_dist <- c("incubation", "period")
Expand Down

0 comments on commit c07e8f8

Please sign in to comment.