mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-26 06:16:56 +09: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:
1 parent
56e42be36d
commit
ee3c82f874
294 files changed
+848
-805
No files matched your search
@@ -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