fix: improve endgame clock and gameplay stability
This commit is contained in:
1 parent
ce6aabfc55
commit
658298ee86
46 files changed
+1915
-99
No files matched your search
@@ -0,0 +1,22 @@
|
||||
package sdkserver
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"net/http/httptest"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestBeforeVerifyReturnsDataObject(t *testing.T) {
|
||||
w := httptest.NewRecorder()
|
||||
beforeVerifyReply(w)
|
||||
var body struct {
|
||||
Retcode int `json:"retcode"`
|
||||
Data map[string]any `json:"data"`
|
||||
}
|
||||
if err := json.Unmarshal(w.Body.Bytes(), &body); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if w.Code != 200 || body.Retcode != 0 || body.Data == nil {
|
||||
t.Fatalf("beforeVerify response cannot initialize SDK data: %s", w.Body.String())
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user