From 417481f05c0dd6ca6a6846af716487271d0e9b4d Mon Sep 17 00:00:00 2001 From: smail Date: Mon, 28 Sep 2026 21:33:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=A4=96=E9=83=A8=E9=82=AE?= =?UTF-8?q?=E7=AE=B1=E6=9B=B4=E6=8D=A2=E5=9B=9E=E5=BD=92=E7=94=A8=E4=BE=8B?= =?UTF-8?q?=E7=9A=84=E5=87=BD=E6=95=B0=E7=AD=BE=E5=90=8D=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 为含可选分组写入保护参数的方法添加用例调用适配,不改变业务授权逻辑或中文提示。后端全量静态检查通过,未执行回归用例或实机验收。 --- backend/services/externalemail/repository_test.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/backend/services/externalemail/repository_test.go b/backend/services/externalemail/repository_test.go index d975f43..402b4a2 100644 --- a/backend/services/externalemail/repository_test.go +++ b/backend/services/externalemail/repository_test.go @@ -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 {