mirror of
https://github.com/go-gitea/gitea.git
synced 2025-10-01 22:38:33 +00:00
Backport #32958 by wxiaoguang Continue even if the avatar deleting fails Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -61,3 +61,11 @@ func TestDeleteAvatar(t *testing.T) {
|
||||
|
||||
assert.Equal(t, "", repo.Avatar)
|
||||
}
|
||||
|
||||
func TestGenerateAvatar(t *testing.T) {
|
||||
templateRepo := &repo_model.Repository{ID: 10, Avatar: "a"}
|
||||
generateRepo := &repo_model.Repository{ID: 11}
|
||||
_ = generateAvatar(db.DefaultContext, templateRepo, generateRepo)
|
||||
assert.NotEmpty(t, generateRepo.Avatar)
|
||||
assert.NotEqual(t, templateRepo.Avatar, generateRepo.Avatar)
|
||||
}
|
||||
|
Reference in New Issue
Block a user