Files

20 lines
476 B
Go
Raw Permalink Normal View History

2026-08-26 06:41:07 +08:00
package saas
import (
"reflect"
"testing"
)
func TestNormalizeExportCategories(t *testing.T) {
actual, err := NormalizeExportCategories([]string{" profile ", "memories", "profile"})
if err != nil {
t.Fatal(err)
}
if !reflect.DeepEqual(actual, []string{"profile", "memories"}) {
t.Fatalf("categories = %#v", actual)
}
if _, err := NormalizeExportCategories([]string{"provider_credentials"}); err == nil {
t.Fatal("unsupported export category should fail")
}
}