diff --git a/src/device/input/parse/v01/server_test.go b/src/device/input/parse/v01/server_test.go index d2e73c8..e44fc44 100644 --- a/src/device/input/parse/v01/server_test.go +++ b/src/device/input/parse/v01/server_test.go @@ -93,6 +93,7 @@ func TestServeGM(t *testing.T) { var result struct { Players int `yaml:"Players"` Users map[string]struct { + Player int Lag string IdleFor string `yaml:"idle_for"` } `yaml:"Users"` @@ -124,6 +125,7 @@ func TestServeGM(t *testing.T) { } v01.cfg.Users = map[string]configUser{ "bel": configUser{ + Player: 3, LastTSMS: time.Now().Add(-1*time.Minute).UnixNano() / int64(time.Millisecond), LastLag: int64(time.Second / time.Millisecond), }, @@ -158,6 +160,9 @@ func TestServeGM(t *testing.T) { } else if d < time.Minute || d > 2*time.Minute { t.Error(d) } + if result.Users["bel"].Player != 3 { + t.Error(result.Users["bel"].Player) + } }) })