为含可选分组写入保护参数的方法添加用例调用适配,不改变业务授权逻辑或中文提示。后端全量静态检查通过,未执行回归用例或实机验收。
This commit is contained in:
parent
7b6891fdbb
commit
417481f05c
@ -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 {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user