修复外部邮箱更换回归用例的函数签名适配
Some checks are pending
Security Checks / security (push) Waiting to run

为含可选分组写入保护参数的方法添加用例调用适配,不改变业务授权逻辑或中文提示。后端全量静态检查通过,未执行回归用例或实机验收。
This commit is contained in:
smail 2026-09-28 21:33:17 +08:00
parent 7b6891fdbb
commit 417481f05c

View File

@ -196,8 +196,12 @@ func TestRepositoryRebindsDisabledEmailWithFreshVerification(t *testing.T) {
bind := repo.Bind
verify := repo.Verify
if replacement {
bind = repo.BeginReplacement
verify = repo.VerifyReplacement
bind = func(request BindRequest) (*models.ExternalEmail, error) {
return repo.BeginReplacement(request)
}
verify = func(userID, id int) error {
return repo.VerifyReplacement(userID, id)
}
}
request := BindRequest{UserID: 1, Email: "OWNER@example.com", Type: models.ExternalEmailTypePrimary}
if _, err := bind(request); err != ErrBindingExists {