mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 10:18:38 +00:00
Enable addtional linters (#34085)
enable mirror, usestdlibbars and perfsprint part of: https://github.com/go-gitea/gitea/issues/34083 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -5,7 +5,6 @@ package integration
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"image/png"
|
||||
"io"
|
||||
"mime/multipart"
|
||||
@@ -84,9 +83,9 @@ func TestUserAvatar(t *testing.T) {
|
||||
}
|
||||
|
||||
func testGetAvatarRedirect(t *testing.T, user *user_model.User) {
|
||||
t.Run(fmt.Sprintf("getAvatarRedirect_%s", user.Name), func(t *testing.T) {
|
||||
t.Run("getAvatarRedirect_"+user.Name, func(t *testing.T) {
|
||||
req := NewRequestf(t, "GET", "/%s.png", user.Name)
|
||||
resp := MakeRequest(t, req, http.StatusSeeOther)
|
||||
assert.Equal(t, fmt.Sprintf("/avatars/%s", user.Avatar), resp.Header().Get("location"))
|
||||
assert.Equal(t, "/avatars/"+user.Avatar, resp.Header().Get("location"))
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user