mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-18 05:45:26 +02:00
fix more tests
This commit is contained in:
parent
168775fb96
commit
2f1e951d11
@ -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))
|
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)
|
// 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)
|
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
|
// 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)
|
// repo1 is a normal repository with issue unit enabled, visit issue 2(which is a pull request)
|
||||||
|
|||||||
@ -49,7 +49,7 @@ func testMirrorPush(t *testing.T, u *url.URL) {
|
|||||||
|
|
||||||
session := loginUser(t, user.Name)
|
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")
|
testCreatePushMirror(t, session, user.Name, srcRepo.Name, pushMirrorURL, user.LowerName, userPassword, "0")
|
||||||
|
|
||||||
mirrors, _, err := repo_model.GetPushMirrorsByRepoID(t.Context(), srcRepo.ID, db.ListOptions{})
|
mirrors, _, err := repo_model.GetPushMirrorsByRepoID(t.Context(), srcRepo.ID, db.ListOptions{})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user