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
|
@ -42,7 +42,7 @@ func testPullMerge(t *testing.T, session *TestSession, user, repo, pullnum strin
|
|||
"_csrf": htmlDoc.GetCSRF(),
|
||||
"do": string(mergeStyle),
|
||||
})
|
||||
resp = session.MakeRequest(t, req, http.StatusFound)
|
||||
resp = session.MakeRequest(t, req, http.StatusSeeOther)
|
||||
|
||||
return resp
|
||||
}
|
||||
|
@ -220,7 +220,7 @@ func TestCantMergeConflict(t *testing.T) {
|
|||
Base: "base",
|
||||
Title: "create a conflicting pr",
|
||||
})
|
||||
session.MakeRequest(t, req, 201)
|
||||
session.MakeRequest(t, req, http.StatusCreated)
|
||||
|
||||
// Now this PR will be marked conflict - or at least a race will do - so drop down to pure code at this point...
|
||||
user1 := unittest.AssertExistsAndLoadBean(t, &user_model.User{
|
||||
|
@ -330,7 +330,7 @@ func TestCantMergeUnrelated(t *testing.T) {
|
|||
Base: "base",
|
||||
Title: "create an unrelated pr",
|
||||
})
|
||||
session.MakeRequest(t, req, 201)
|
||||
session.MakeRequest(t, req, http.StatusCreated)
|
||||
|
||||
// Now this PR could be marked conflict - or at least a race may occur - so drop down to pure code at this point...
|
||||
gitRepo, err := git.OpenRepository(path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue