impl,test fill non player aliases
This commit is contained in:
@@ -194,7 +194,24 @@ func TestServeGM(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("fillNonPlayerAliases", func(t *testing.T) {
|
||||
t.Error("not impl")
|
||||
t.Run("happy", func(t *testing.T) {
|
||||
v01 := NewV01(ctx, nil)
|
||||
v01.cfg.Users = map[string]configUser{
|
||||
"bel": configUser{Player: 1},
|
||||
"zach": configUser{Player: 0},
|
||||
}
|
||||
do(v01, "/gm/rpc/fillNonPlayerAliases", "[qt]")
|
||||
if v := v01.cfg.Users["bel"]; v.Alias != "" {
|
||||
t.Error(v.Alias)
|
||||
} else if v.Player != 1 {
|
||||
t.Error(v.Player)
|
||||
}
|
||||
if v := v01.cfg.Users["zach"]; v.Alias != "qt" {
|
||||
t.Error(v.Alias)
|
||||
} else if v.Player != 0 {
|
||||
t.Error(v.Player)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
t.Run("vote", func(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user