aboutsummaryrefslogtreecommitdiffstats
path: root/services/repository/avatar_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/repository/avatar_test.go')
-rw-r--r--services/repository/avatar_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/services/repository/avatar_test.go b/services/repository/avatar_test.go
index 4a0ba61853..bea820e85f 100644
--- a/services/repository/avatar_test.go
+++ b/services/repository/avatar_test.go
@@ -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)
+}