Files
opc-backup/reference/new-api/model/option_auto_group_test.go
T
2026-08-23 21:35:45 +08:00

18 lines
448 B
Go

package model
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestValidateOptionValueRejectsInvalidMaxTokenAutoGroups(t *testing.T) {
for _, value := range []string{"", "0", "-1", "1.5", "invalid"} {
t.Run(value, func(t *testing.T) {
assert.Error(t, validateOptionValue("MaxTokenAutoGroups", value))
})
}
require.NoError(t, validateOptionValue("MaxTokenAutoGroups", "999999"))
}