0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-04-03 23:22:39 +02:00

fix more tests

This commit is contained in:
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 2025-11-25 18:05:01 -05:00
parent 6d723d6d67
commit 6e2f41b5b9
No known key found for this signature in database
GPG Key ID: 924A5F6AF051E87C
2 changed files with 3 additions and 3 deletions

View File

@ -455,9 +455,9 @@ func TestIssueRedirect(t *testing.T) {
assert.Equal(t, "https://tracker.com/org26/repo_external_tracker_numeric/issues/1", test.RedirectURL(resp))
// Test external tracker with alphanumeric style (for a pull request)
req = NewRequest(t, "GET", "/org26/repo_external_tracker_alpha/issues/1")
req = NewRequest(t, "GET", "/org26/group/41/repo_external_tracker_alpha/issues/1")
resp = session.MakeRequest(t, req, http.StatusSeeOther)
assert.Equal(t, "/org26/group/41/repo_external_tracker_alpha/pulls/1", test.RedirectURL(resp))
assert.Equal(t, "/org26/repo_external_tracker_alpha/pulls/1", test.RedirectURL(resp))
// test to check that the PR redirection works if the issue unit is disabled
// repo1 is a normal repository with issue unit enabled, visit issue 2(which is a pull request)

View File

@ -49,7 +49,7 @@ func testMirrorPush(t *testing.T, u *url.URL) {
session := loginUser(t, user.Name)
pushMirrorURL := fmt.Sprintf("%s/%s%s", u.String(), url.PathEscape(user.Name), url.PathEscape(mirrorRepo.Name))
pushMirrorURL := fmt.Sprintf("%s%s/%s", u.String(), url.PathEscape(user.Name), url.PathEscape(mirrorRepo.Name))
testCreatePushMirror(t, session, user.Name, srcRepo.Name, pushMirrorURL, user.LowerName, userPassword, "0")
mirrors, _, err := repo_model.GetPushMirrorsByRepoID(t.Context(), srcRepo.ID, db.ListOptions{})