blob: 78b798010d191bbcef2027170a3b361345aed56c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
package presentation
import "testing"
func TestGetInitials(t *testing.T) {
for input, output := range map[string]string{
"Jesse Duffield": "JD",
"Jesse Duffield Man": "JD",
"JesseDuffield": "Je",
"J": "J",
"": "",
} {
if output != getInitials(input) {
t.Errorf("Expected %s to be %s", input, output)
}
}
}
|