修复外部邮箱更换回归用例的函数签名适配
为含可选分组写入保护参数的方法添加用例调用适配,不改变业务授权逻辑或中文提示。后端全量静态检查通过,未执行回归用例或实机验收。
This commit is contained in:
parent
0328b74173
commit
2f738eb083
@ -196,8 +196,12 @@ func TestRepositoryRebindsDisabledEmailWithFreshVerification(t *testing.T) {
|
|||||||
bind := repo.Bind
|
bind := repo.Bind
|
||||||
verify := repo.Verify
|
verify := repo.Verify
|
||||||
if replacement {
|
if replacement {
|
||||||
bind = repo.BeginReplacement
|
bind = func(request BindRequest) (*models.ExternalEmail, error) {
|
||||||
verify = repo.VerifyReplacement
|
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}
|
request := BindRequest{UserID: 1, Email: "OWNER@example.com", Type: models.ExternalEmailTypePrimary}
|
||||||
if _, err := bind(request); err != ErrBindingExists {
|
if _, err := bind(request); err != ErrBindingExists {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user