Use http constants (#3766)

This commit is contained in:
qwerty287
2024-06-06 11:16:45 +02:00
committed by GitHub
parent f5671ba20f
commit d28e150534
14 changed files with 43 additions and 49 deletions

View File

@@ -51,9 +51,9 @@ func NewServer(t *testing.T) *httptest.Server {
return
case "/api/v4/projects/4/hooks":
switch r.Method {
case "GET":
case http.MethodGet:
w.Write(project4PayloadHooks)
case "POST":
case http.MethodPost:
w.Write(project4PayloadHook)
w.WriteHeader(201)
}