mirror of
https://github.com/go-gitea/gitea
synced 2025-07-23 02:38:35 +00:00
Fix repo avatar conflict (#32958)
Continue even if the avatar deleting fails
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