aboutsummaryrefslogtreecommitdiffstats
path: root/services/auth/auth_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/auth/auth_test.go')
-rw-r--r--services/auth/auth_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/services/auth/auth_test.go b/services/auth/auth_test.go
index b8d3396163..c45f312c90 100644
--- a/services/auth/auth_test.go
+++ b/services/auth/auth_test.go
@@ -97,7 +97,7 @@ func Test_isGitRawOrLFSPath(t *testing.T) {
defer test.MockVariableValue(&setting.LFS.StartServer)()
for _, tt := range tests {
t.Run(tt.path, func(t *testing.T) {
- req, _ := http.NewRequest("POST", "http://localhost"+tt.path, nil)
+ req, _ := http.NewRequest(http.MethodPost, "http://localhost"+tt.path, nil)
setting.LFS.StartServer = false
assert.Equal(t, tt.want, newAuthPathDetector(req).isGitRawOrAttachOrLFSPath())
@@ -119,7 +119,7 @@ func Test_isGitRawOrLFSPath(t *testing.T) {
}
for _, tt := range lfsTests {
t.Run(tt, func(t *testing.T) {
- req, _ := http.NewRequest("POST", tt, nil)
+ req, _ := http.NewRequest(http.MethodPost, tt, nil)
setting.LFS.StartServer = false
got := newAuthPathDetector(req).isGitRawOrAttachOrLFSPath()
assert.Equalf(t, setting.LFS.StartServer, got, "isGitOrLFSPath(%q) = %v, want %v, %v", tt, got, setting.LFS.StartServer, globalVars().gitRawOrAttachPathRe.MatchString(tt))
@@ -148,7 +148,7 @@ func Test_isFeedRequest(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.path, func(t *testing.T) {
- req, _ := http.NewRequest("GET", "http://localhost"+tt.path, nil)
+ req, _ := http.NewRequest(http.MethodGet, "http://localhost"+tt.path, nil)
assert.Equal(t, tt.want, newAuthPathDetector(req).isFeedRequest(req))
})
}