adjust tests (10)

This commit is contained in:
6543 2024-10-31 22:48:45 +01:00
parent 8e539117d9
commit d63f28289c
1 changed files with 3 additions and 1 deletions

View File

@ -200,7 +200,9 @@ func prepareRepoPR(t *testing.T, baseSession, headSession *TestSession, baseRepo
func checkRecentlyPushedNewBranches(t *testing.T, session *TestSession, repoPath string, expected []string) { func checkRecentlyPushedNewBranches(t *testing.T, session *TestSession, repoPath string, expected []string) {
branches := make([]string, 0, 2) branches := make([]string, 0, 2)
req := NewRequest(t, "GET", repoPath) req := NewRequest(t, "GET", repoPath)
resp := session.MakeRequest(t, req, http.StatusOK) resp := session.MakeRequest(t, req, http.StatusMovedPermanently)
req = NewRequest(t, "GET", resp.Result().Header.Get("Location"))
resp = MakeRequest(t, req, http.StatusOK)
doc := NewHTMLParser(t, resp.Body) doc := NewHTMLParser(t, resp.Body)
doc.doc.Find(".ui.positive.message div a").Each(func(index int, branch *goquery.Selection) { doc.doc.Find(".ui.positive.message div a").Each(func(index int, branch *goquery.Selection) {
branches = append(branches, branch.Text()) branches = append(branches, branch.Text())