-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(listGroupInput): shift dots arg to front
- Loading branch information
nteetor
committed
Mar 14, 2020
1 parent
e1ed698
commit ce0fbbe
Showing
3 changed files
with
26 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,27 @@ | ||
context("list group input") | ||
|
||
test_that("id is character or null", { | ||
expect_silent(listGroupInput("ID")) | ||
expect_silent(listGroupInput(NULL)) | ||
expect_silent(listGroupInput(id = "ID")) | ||
expect_silent(listGroupInput(id = NULL)) | ||
|
||
expect_error(listGroupInput(NA_character_)) | ||
expect_error(listGroupInput(3030)) | ||
expect_error(listGroupInput(id = NA_character_)) | ||
expect_error(listGroupInput(id = 3030)) | ||
}) | ||
|
||
test_that("choices and values same length", { | ||
expect_silent(listGroupInput("ID", c("one"))) | ||
expect_silent(listGroupInput("ID", c("two"), c("two"))) | ||
expect_silent(listGroupInput(id = "ID", choices = c("one"))) | ||
expect_silent(listGroupInput( | ||
id = "ID", choices = c("two"), values = c("two") | ||
)) | ||
|
||
expect_error(listGroupInput("ID", c("three"), c("three", "four"))) | ||
expect_error(listGroupInput("ID", c("four", "five"), "four")) | ||
expect_error(listGroupInput( | ||
id = "ID", choices = c("three"), values = c("three", "four") | ||
)) | ||
expect_error(listGroupInput( | ||
id = "ID", choices = c("four", "five"), values = "four" | ||
)) | ||
}) | ||
|
||
test_that("has dependencies", { | ||
expect_dependencies(listGroupInput("ID")) | ||
expect_dependencies(listGroupInput(id = "ID")) | ||
}) |