(t *testing.T)
| 33 | } |
| 34 | |
| 35 | func TestRandomName(t *testing.T) { |
| 36 | t.Parallel() |
| 37 | |
| 38 | for range 10 { |
| 39 | name := coderdtest.RandomName(t) |
| 40 | |
| 41 | require.NotEmpty(t, name, "name should not be empty") |
| 42 | require.NotContains(t, name, "_", "name should not contain underscores") |
| 43 | |
| 44 | // Should be title cased (e.g., "Happy Einstein"). |
| 45 | words := strings.Split(name, " ") |
| 46 | require.Len(t, words, 2, "name should have exactly two words") |
| 47 | for _, word := range words { |
| 48 | firstRune := []rune(word)[0] |
| 49 | require.True(t, unicode.IsUpper(firstRune), "word %q should start with uppercase letter", word) |
| 50 | } |
| 51 | } |
| 52 | } |
nothing calls this directly
no test coverage detected