refactor all methods strings to const (#5726)

This commit is contained in:
Konstantin Lebedev
2024-07-01 13:00:39 +05:00
committed by GitHub
parent 0fdf7eca48
commit 5ffacbb6ea
18 changed files with 84 additions and 84 deletions

View File

@@ -189,7 +189,7 @@ func TestDeleteUser(t *testing.T) {
func executeRequest(req *http.Request, v interface{}) (*httptest.ResponseRecorder, error) {
rr := httptest.NewRecorder()
apiRouter := mux.NewRouter().SkipClean(true)
apiRouter.Path("/").Methods("POST").HandlerFunc(ias.DoActions)
apiRouter.Path("/").Methods(http.MethodPost).HandlerFunc(ias.DoActions)
apiRouter.ServeHTTP(rr, req)
return rr, xml.Unmarshal(rr.Body.Bytes(), &v)
}