summaryrefslogtreecommitdiffstats
path: root/integrations/user_avatar_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'integrations/user_avatar_test.go')
-rw-r--r--integrations/user_avatar_test.go11
1 files changed, 2 insertions, 9 deletions
diff --git a/integrations/user_avatar_test.go b/integrations/user_avatar_test.go
index c909fd6851..6de2914f7f 100644
--- a/integrations/user_avatar_test.go
+++ b/integrations/user_avatar_test.go
@@ -11,7 +11,6 @@ import (
"mime/multipart"
"net/http"
"net/url"
- "strings"
"testing"
"code.gitea.io/gitea/models"
@@ -75,14 +74,8 @@ func TestUserAvatar(t *testing.T) {
user2 = db.AssertExistsAndLoadBean(t, &models.User{ID: 2}).(*models.User) // owner of the repo3, is an org
req = NewRequest(t, "GET", user2.AvatarLink())
- resp := session.MakeRequest(t, req, http.StatusFound)
- location := resp.Header().Get("Location")
- if !strings.HasPrefix(location, "/avatars") {
- assert.Fail(t, "Avatar location is not local: %s", location)
- }
- req = NewRequest(t, "GET", location)
- session.MakeRequest(t, req, http.StatusOK)
+ _ = session.MakeRequest(t, req, http.StatusOK)
- // Can't test if the response matches because the image is regened on upload but checking that this at least doesn't give a 404 should be enough.
+ // Can't test if the response matches because the image is re-generated on upload but checking that this at least doesn't give a 404 should be enough.
})
}