mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	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:
		@@ -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)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user