forked from forgejo/forgejo
Update HTTP status codes to modern codes (#18063)
* 2xx/3xx/4xx/5xx -> http.Status... * http.StatusFound -> http.StatusTemporaryRedirect * http.StatusMovedPermanently -> http.StatusPermanentRedirect
This commit is contained in:
parent
395117d301
commit
3f280f89e7
76 changed files with 211 additions and 212 deletions
|
@ -380,7 +380,7 @@ func loginUserWithPassword(t testing.TB, userName, password string) *TestSession
|
|||
"user_name": userName,
|
||||
"password": password,
|
||||
})
|
||||
resp = MakeRequest(t, req, http.StatusFound)
|
||||
resp = MakeRequest(t, req, http.StatusSeeOther)
|
||||
|
||||
ch := http.Header{}
|
||||
ch.Add("Cookie", strings.Join(resp.Header()["Set-Cookie"], ";"))
|
||||
|
@ -408,7 +408,7 @@ func getTokenForLoggedInUser(t testing.TB, session *TestSession) string {
|
|||
"_csrf": doc.GetCSRF(),
|
||||
"name": fmt.Sprintf("api-testing-token-%d", tokenCounter),
|
||||
})
|
||||
resp = session.MakeRequest(t, req, http.StatusFound)
|
||||
resp = session.MakeRequest(t, req, http.StatusSeeOther)
|
||||
req = NewRequest(t, "GET", "/user/settings/applications")
|
||||
resp = session.MakeRequest(t, req, http.StatusOK)
|
||||
htmlDoc := NewHTMLParser(t, resp.Body)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue