1
0
mirror of synced 2026-10-19 14:06:31 +08:00

🆕 #3951 【小程序】新增服务端检查登录态(checkSessionKey)接口

This commit is contained in:
Copilot
2026-04-11 17:26:50 +08:00
committed by GitHub
parent 7089548f09
commit 62cbecd871
4 changed files with 34 additions and 0 deletions

View File

@@ -81,4 +81,10 @@ public class WxMaUserServiceImplTest {
public void testGetAccessToken() throws Exception{
assertNotNull(wxService.getAccessToken(true));
}
@Test(expectedExceptions = WxErrorException.class)
public void testCheckSessionKey() throws WxErrorException {
// 使用无效的 openid 和 sessionKey,预期微信服务端返回错误并抛出 WxErrorException
this.wxService.getUserService().checkSessionKey("invalid_openid", "invalid_session_key");
}
}