Adding one more test (for no-op case)

This commit is contained in:
Robin Walsh 2015-08-26 09:26:20 -07:00
parent 4b7c2cc114
commit 34b84367b5
1 changed files with 11 additions and 1 deletions

View File

@ -9,7 +9,17 @@ func TestNormalizeDisplayName(t *testing.T) {
expectedName := "___test_name_should_be_normalized___"
normalizedName := normalizeDisplayName(invalidName)
if normalizedName != expectedName {
t.Fatalf("normalizeDisplayName does not normalize AWS name correctly: %s", normalizedName)
t.Fatalf(
"normalizeDisplayName does not normalize AWS name correctly: %s",
normalizedName)
}
validName := "test_name_should_normalize_to_itself@example.com"
normalizedValidName := normalizeDisplayName(validName)
if normalizedValidName != validName {
t.Fatalf(
"normalizeDisplayName erroneously normalizes valid names: %s",
normalizedName)
}
}