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
|
@ -27,7 +27,7 @@ func TestRenameBranch(t *testing.T) {
|
|||
"to": "main",
|
||||
}
|
||||
req = NewRequestWithValues(t, "POST", "/user2/repo1/settings/rename_branch", postData)
|
||||
session.MakeRequest(t, req, http.StatusFound)
|
||||
session.MakeRequest(t, req, http.StatusSeeOther)
|
||||
|
||||
// check new branch link
|
||||
req = NewRequestWithValues(t, "GET", "/user2/repo1/src/branch/main/README.md", postData)
|
||||
|
@ -35,7 +35,7 @@ func TestRenameBranch(t *testing.T) {
|
|||
|
||||
// check old branch link
|
||||
req = NewRequestWithValues(t, "GET", "/user2/repo1/src/branch/master/README.md", postData)
|
||||
resp = session.MakeRequest(t, req, http.StatusFound)
|
||||
resp = session.MakeRequest(t, req, http.StatusSeeOther)
|
||||
location := resp.HeaderMap.Get("Location")
|
||||
assert.Equal(t, "/user2/repo1/src/branch/main/README.md", location)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue