feat: 建立可靠通知、吊销与跨实例状态

This commit is contained in:
weijuesen
2026-08-14 01:41:14 +08:00
parent a6a996a518
commit a25bc7abc6
22 changed files with 1017 additions and 245 deletions
+5 -1
View File
@@ -106,7 +106,11 @@ func TestWechatSendSubscribeErrorCode(t *testing.T) {
s.baseURL = srv.URL
s.accessToken = "fake-token"
s.tokenExpire = time.Now().Add(time.Hour)
if err := s.SendSubscribe(context.Background(), "bad", "tmpl1", nil, ""); err == nil {
result, err := s.SendSubscribeResult(context.Background(), "bad", "tmpl1", nil, "")
if err == nil {
t.Error("errcode!=0 应返回错误")
}
if result.ErrCode != 40003 || result.ErrMsg != "invalid openid" {
t.Errorf("response code = %+v", result)
}
}