mirror of
https://github.com/openlibrecommunity/olcrtc.git
synced 2026-06-02 06:23:37 +02:00
20 lines
336 B
Go
20 lines
336 B
Go
package names
|
|
|
|
import "testing"
|
|
|
|
func TestGenerateFallsBackWhenListsAreEmpty(t *testing.T) {
|
|
oldFirst := firstNames
|
|
oldLast := lastNames
|
|
defer func() {
|
|
firstNames = oldFirst
|
|
lastNames = oldLast
|
|
}()
|
|
|
|
firstNames = nil
|
|
lastNames = nil
|
|
|
|
if got := Generate(); got == "" {
|
|
t.Fatal("Generate returned an empty display name")
|
|
}
|
|
}
|