Adding unit test for normalizeDisplayName()

This commit is contained in:
Robin Walsh 2015-08-26 09:23:33 -07:00
parent 8530f14fee
commit 4b7c2cc114
1 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,15 @@
package aws
import (
"testing"
)
func TestNormalizeDisplayName(t *testing.T) {
invalidName := "^#$test name\nshould be normalized)(*"
expectedName := "___test_name_should_be_normalized___"
normalizedName := normalizeDisplayName(invalidName)
if normalizedName != expectedName {
t.Fatalf("normalizeDisplayName does not normalize AWS name correctly: %s", normalizedName)
}
}