context("dropdown") test_that("test dropdown_input", { # type expect_is(dropdown_input("a", c(1,2,3)), "shiny.tag") # wrong input expect_error(dropdown_input("a"), "argument \"choices\" is missing, with no default") # simple input si_str <- as.character(dropdown_input("a", c(1,2,3))) expect_true(any(grepl("
1
", si_str, fixed = TRUE))) expect_true(any(grepl("
2
", si_str, fixed = TRUE))) expect_true(any(grepl("
3
", si_str, fixed = TRUE))) expect_false(any(grepl("
0
", si_str, fixed = TRUE))) })