summaryrefslogtreecommitdiffstats
path: root/integrations/editor_test.go
diff options
context:
space:
mode:
authorKN4CK3R <admin@oldschoolhack.me>2022-03-23 05:54:07 +0100
committerGitHub <noreply@github.com>2022-03-23 12:54:07 +0800
commit3f280f89e7471a6dcdaefccc64a8d39188970e63 (patch)
treeff09b6dcb00b4c0ff0c436c4523d89a5c13f3a94 /integrations/editor_test.go
parent395117d3014124b9147a1aabf76ee175e720b275 (diff)
downloadgitea-3f280f89e7471a6dcdaefccc64a8d39188970e63.tar.gz
gitea-3f280f89e7471a6dcdaefccc64a8d39188970e63.zip
Update HTTP status codes to modern codes (#18063)
* 2xx/3xx/4xx/5xx -> http.Status... * http.StatusFound -> http.StatusTemporaryRedirect * http.StatusMovedPermanently -> http.StatusPermanentRedirect
Diffstat (limited to 'integrations/editor_test.go')
-rw-r--r--integrations/editor_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/integrations/editor_test.go b/integrations/editor_test.go
index 05892aa906..3ed0e510c4 100644
--- a/integrations/editor_test.go
+++ b/integrations/editor_test.go
@@ -34,7 +34,7 @@ func TestCreateFile(t *testing.T) {
"content": "Content",
"commit_choice": "direct",
})
- session.MakeRequest(t, req, http.StatusFound)
+ session.MakeRequest(t, req, http.StatusSeeOther)
})
}
@@ -48,7 +48,7 @@ func TestCreateFileOnProtectedBranch(t *testing.T) {
"_csrf": csrf,
"protected": "on",
})
- session.MakeRequest(t, req, http.StatusFound)
+ session.MakeRequest(t, req, http.StatusSeeOther)
// Check if master branch has been locked successfully
flashCookie := session.GetCookie("macaron_flash")
assert.NotNil(t, flashCookie)
@@ -82,7 +82,7 @@ func TestCreateFileOnProtectedBranch(t *testing.T) {
"_csrf": csrf,
"protected": "off",
})
- resp = session.MakeRequest(t, req, http.StatusFound)
+ resp = session.MakeRequest(t, req, http.StatusSeeOther)
// Check if master branch has been locked successfully
flashCookie = session.GetCookie("macaron_flash")
assert.NotNil(t, flashCookie)
@@ -109,7 +109,7 @@ func testEditFile(t *testing.T, session *TestSession, user, repo, branch, filePa
"commit_choice": "direct",
},
)
- resp = session.MakeRequest(t, req, http.StatusFound)
+ resp = session.MakeRequest(t, req, http.StatusSeeOther)
// Verify the change
req = NewRequest(t, "GET", path.Join(user, repo, "raw/branch", branch, filePath))
@@ -139,7 +139,7 @@ func testEditFileToNewBranch(t *testing.T, session *TestSession, user, repo, bra
"new_branch_name": targetBranch,
},
)
- resp = session.MakeRequest(t, req, http.StatusFound)
+ resp = session.MakeRequest(t, req, http.StatusSeeOther)
// Verify the change
req = NewRequest(t, "GET", path.Join(user, repo, "raw/branch", targetBranch, filePath))