mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: return empty array if no option multi-selected (#19224)
Related: https://github.com/coder/coder/issues/19145
This commit is contained in:
@@ -111,6 +111,17 @@ func TestRichMultiSelect(t *testing.T) {
|
||||
allowCustom: true,
|
||||
want: []string{"aaa", "bbb"},
|
||||
},
|
||||
{
|
||||
name: "NoOptionSelected",
|
||||
options: []codersdk.TemplateVersionParameterOption{
|
||||
{Name: "AAA", Description: "This is AAA", Value: "aaa"},
|
||||
{Name: "BBB", Description: "This is BBB", Value: "bbb"},
|
||||
{Name: "CCC", Description: "This is CCC", Value: "ccc"},
|
||||
},
|
||||
defaults: []string{},
|
||||
allowCustom: false,
|
||||
want: []string{},
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
|
||||
Reference in New Issue
Block a user