R85 企微未绑定登录后自动补绑定

这个提交包含在:
2026-05-05 00:05:58 +08:00
父节点 8f08243882
当前提交 d791357ca2
共修改 4 个文件,包含 265 行新增和 0 行删除
@@ -185,6 +185,7 @@ describe("wecom auth routes R27", () => {
expect(response.statusCode).toBe(302);
expect(response.headers.location).toBe("https://oa.hyinda.com/login?redirect=%2Fportal&wecom=unbound");
expect(String(response.headers["set-cookie"] ?? "")).toContain("wecom_login_bind=");
await app.close();
});
@@ -215,6 +216,7 @@ describe("wecom auth routes R27", () => {
expect(response.statusCode).toBe(302);
expect(response.headers.location).toBe("https://oa.hyinda.com/login?redirect=%2Fportal&wecom=unbound");
expect(String(response.headers["set-cookie"] ?? "")).toContain("wecom_login_bind=");
expect(prisma.wecomIdentityBinding.findUnique).toHaveBeenCalledWith({
where: { external_user_id: "wecom-unbound-lowercase" },
select: { employee_id: true, employee: { select: { id: true, status: true, token_version: true } } },