mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-24 03:29:50 +02:00
refactor: clean up git migration forms (#39672)
Only extracted shared code, removed unnecessary code, and use form-fetch-action to replace RenderWithErrDeprecated, slightly refactored JS to use data-global-init Nothing else is changed, although there are still many problems. Written by AI Diff with hiding spaces: https://github.com/go-gitea/gitea/pull/39672/changes?w=1
This commit is contained in:
1 parent
89ec271d9c
commit
cc623c5f2f
18 files changed
+274
-724
No files matched your search
@@ -94,9 +94,9 @@ func TestMigrateGiteaForm(t *testing.T) {
|
||||
"description": "",
|
||||
"uid": strconv.FormatInt(repoOwner.ID, 10),
|
||||
})
|
||||
resp = session.MakeRequest(t, req, http.StatusSeeOther)
|
||||
resp = session.MakeRequest(t, req, http.StatusOK)
|
||||
// Step 5: a redirection displays the migrated repository
|
||||
loc := resp.Header().Get("Location")
|
||||
loc := *test.ParseJSONRedirect(resp.Body.Bytes()).Redirect
|
||||
assert.Equal(t, fmt.Sprintf("/%s/%s", ownerName, migratedRepoName), loc)
|
||||
// Step 6: check the repo was created
|
||||
unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{Name: migratedRepoName})
|
||||
|
||||
Reference in new issue
Block a user