summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2021-10-25 13:01:16 +0800
committerGitHub <noreply@github.com>2021-10-25 13:01:16 +0800
commit7c951fdd4a9dc15313522ac27aacd687687ddafc (patch)
tree6866a5b49517903bbff56759d17784d4d6bd246d /modules
parent3676fafdacaef7ef0a6b72be99a342f91c8d5e5d (diff)
downloadgitea-7c951fdd4a9dc15313522ac27aacd687687ddafc.tar.gz
gitea-7c951fdd4a9dc15313522ac27aacd687687ddafc.zip
In many cases user avatar link should be an absolute URL with http host (#17420)
Diffstat (limited to 'modules')
-rw-r--r--modules/convert/user_test.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/convert/user_test.go b/modules/convert/user_test.go
index 404adc2029..acf918dd99 100644
--- a/modules/convert/user_test.go
+++ b/modules/convert/user_test.go
@@ -21,6 +21,7 @@ func TestUser_ToUser(t *testing.T) {
apiUser := toUser(user1, true, true)
assert.True(t, apiUser.IsAdmin)
+ assert.Contains(t, apiUser.AvatarURL, "://")
user2 := db.AssertExistsAndLoadBean(t, &models.User{ID: 2, IsAdmin: false}).(*models.User)