Files
aura-crm/production/backend/internal/featuremodules/validate_test.go
T

26 lines
489 B
Go

package featuremodules
import "testing"
func TestIsValidKey(t *testing.T) {
cases := []struct {
key string
want bool
}{
{"online_shop", true},
{"catalogs", true},
{"cartridges", true},
{"service", false},
{"", false},
{"online-shop", false},
{"ONLINE_SHOP", false},
}
for _, tc := range cases {
t.Run(tc.key, func(t *testing.T) {
if got := isValidKey(tc.key); got != tc.want {
t.Errorf("isValidKey(%q) = %v, want %v", tc.key, got, tc.want)
}
})
}
}