修复认证验证码投递与登录入口体验 05-27-oa-auth-delivery-wecom-entry-fix
这个提交包含在:
@@ -0,0 +1,37 @@
|
||||
const { resolveEmailDeliveryStatus } = require("../../../src/services/email");
|
||||
|
||||
describe("email delivery status", () => {
|
||||
it("reports ready only when SMTP delivery has the required public settings", () => {
|
||||
expect(
|
||||
resolveEmailDeliveryStatus({
|
||||
emailEnabled: true,
|
||||
emailFrom: "[email protected]",
|
||||
smtpHost: "smtp.hyinda.test",
|
||||
smtpPort: 587,
|
||||
smtpSecure: false,
|
||||
smtpUser: "",
|
||||
smtpPass: "",
|
||||
}),
|
||||
).toEqual({
|
||||
ready: true,
|
||||
reasons: [],
|
||||
});
|
||||
});
|
||||
|
||||
it("reports non-secret missing SMTP reasons", () => {
|
||||
expect(
|
||||
resolveEmailDeliveryStatus({
|
||||
emailEnabled: true,
|
||||
emailFrom: "",
|
||||
smtpHost: "",
|
||||
smtpPort: 0,
|
||||
smtpSecure: false,
|
||||
smtpUser: "sender",
|
||||
smtpPass: "",
|
||||
}),
|
||||
).toEqual({
|
||||
ready: false,
|
||||
reasons: ["email_from_missing", "smtp_host_missing", "smtp_port_invalid", "smtp_auth_incomplete"],
|
||||
});
|
||||
});
|
||||
});
|
||||
在新工单中引用
屏蔽一个用户