File tree Expand file tree Collapse file tree 1 file changed +20
-3
lines changed Expand file tree Collapse file tree 1 file changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -54,16 +54,33 @@ testthat::test_that("assert_single_selection fails when multiple selection is se
5454 tm_g_bivariate(
5555 " a label" ,
5656 x ,
57- x
57+ mock_spec2
5858 ),
5959 " 'x' should not allow multiple selection"
6060 )
6161
6262 testthat :: expect_error(
6363 tm_g_bivariate(
6464 " a label" ,
65- list (mock_spec2 , mock_spec , data_extract_spec(" EMPTY" )),
66- x
65+ list (mock_spec2 , mock_spec ),
66+ mock_spec2
67+ ),
68+ " 'x' should not allow multiple selection"
69+ )
70+ })
71+
72+ testthat :: test_that(" assert_single_selection fails when with default spec" , {
73+ # Suppress logger messages
74+ local_logger_threshold(logger :: FATAL )
75+
76+ testthat :: expect_error(
77+ tm_g_bivariate(
78+ " a label" ,
79+ data_extract_spec(" DEFAULT" ),
80+ data_extract_spec(
81+ " VALID" ,
82+ teal.transform :: select_spec(choices = c(" A" , " B" ), multiple = FALSE )
83+ )
6784 ),
6885 " 'x' should not allow multiple selection"
6986 )
You can’t perform that action at this time.
0 commit comments