mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: validate that parameter names are unique (#7882)
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package strings_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/coder/coder/coderd/util/strings"
|
||||
)
|
||||
|
||||
func TestJoinWithConjunction(t *testing.T) {
|
||||
t.Parallel()
|
||||
require.Equal(t, "foo", strings.JoinWithConjunction([]string{"foo"}))
|
||||
require.Equal(t, "foo and bar", strings.JoinWithConjunction([]string{"foo", "bar"}))
|
||||
require.Equal(t, "foo, bar and baz", strings.JoinWithConjunction([]string{"foo", "bar", "baz"}))
|
||||
}
|
||||
Reference in New Issue
Block a user