Adding unit test for normalizeDisplayName()
This commit is contained in:
parent
8530f14fee
commit
4b7c2cc114
|
@ -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)
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue