20 lines
476 B
Go
20 lines
476 B
Go
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")
|
|
}
|
|
}
|