diff --git a/tests/testthat/test-count.R b/tests/testthat/test-count.R index 2d685cbb..e6e28ae7 100644 --- a/tests/testthat/test-count.R +++ b/tests/testthat/test-count.R @@ -42,5 +42,6 @@ test_that("counts work", { expect_error(count_S("test", as_percent = "test")) expect_error(count_df(c("A", "B", "C"))) + expect_error(count_df(septic_patients[,"date"])) }) diff --git a/tests/testthat/test-ggplot_rsi.R b/tests/testthat/test-ggplot_rsi.R index 8ec10750..631b192c 100644 --- a/tests/testthat/test-ggplot_rsi.R +++ b/tests/testthat/test-ggplot_rsi.R @@ -38,4 +38,10 @@ test_that("ggplot_rsi works", { summarise_all(count_IR) %>% as.double() ) + expect_equal(colnames(getlbls(septic_patients %>% select(amcl, cipr))), + c("Interpretation", "Antibiotic", "Value", "lbl")) + + expect_error(ggplot_rsi(septic_patients, fun = "invalid")) + expect_error(geom_rsi(septic_patients, fun = "invalid")) + }) diff --git a/tests/testthat/test-mo_property.R b/tests/testthat/test-mo_property.R index d4f91bfe..e28cdbbc 100644 --- a/tests/testthat/test-mo_property.R +++ b/tests/testthat/test-mo_property.R @@ -12,6 +12,7 @@ test_that("mo_property works", { expect_equal(mo_type("E. coli", language = "en"), "Bacteria") expect_equal(mo_gramstain("E. coli", language = "en"), "Negative rods") expect_equal(mo_aerobic("E. coli"), TRUE) + expect_equal(class(mo_taxonomy("E. coli")), "list") expect_equal(mo_shortname("MRSA"), "S. aureus") expect_equal(mo_shortname("MRSA", Becker = TRUE), "S. aureus") diff --git a/tests/testthat/test-portion.R b/tests/testthat/test-portion.R index 8e80cceb..db05330a 100755 --- a/tests/testthat/test-portion.R +++ b/tests/testthat/test-portion.R @@ -167,4 +167,5 @@ test_that("prediction of rsi works", { info = TRUE)) expect_error(portion_df(c("A", "B", "C"))) + expect_error(portion_df(septic_patients[,"date"])) })