mirror of https://github.com/go-gitea/gitea.git
CI feedback
This commit is contained in:
parent
c1c1be56f7
commit
5722bb4f48
|
@ -226,7 +226,6 @@ func TestPullView_GivenApproveOrRejectReviewOnClosedPR(t *testing.T) {
|
||||||
|
|
||||||
// Submit a reject review on the PR.
|
// Submit a reject review on the PR.
|
||||||
testSubmitReview(t, user2Session, htmlDoc.GetCSRF(), "user2", "repo1", elem[4], "reject", http.StatusUnprocessableEntity)
|
testSubmitReview(t, user2Session, htmlDoc.GetCSRF(), "user2", "repo1", elem[4], "reject", http.StatusUnprocessableEntity)
|
||||||
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -239,8 +238,8 @@ func testSubmitReview(t *testing.T, session *TestSession, csrf, owner, repo, pul
|
||||||
"type": reviewType,
|
"type": reviewType,
|
||||||
}
|
}
|
||||||
|
|
||||||
submitUrl := path.Join(owner, repo, "pulls", pullNumber, "files", "reviews", "submit")
|
submitURL := path.Join(owner, repo, "pulls", pullNumber, "files", "reviews", "submit")
|
||||||
req := NewRequestWithValues(t, "POST", submitUrl, options)
|
req := NewRequestWithValues(t, "POST", submitURL, options)
|
||||||
return session.MakeRequest(t, req, expectedSubmitStatus)
|
return session.MakeRequest(t, req, expectedSubmitStatus)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -249,13 +248,13 @@ func testIssueClose(t *testing.T, session *TestSession, owner, repo, issueNumber
|
||||||
resp := session.MakeRequest(t, req, http.StatusOK)
|
resp := session.MakeRequest(t, req, http.StatusOK)
|
||||||
|
|
||||||
htmlDoc := NewHTMLParser(t, resp.Body)
|
htmlDoc := NewHTMLParser(t, resp.Body)
|
||||||
closeUrl := path.Join(owner, repo, "issues", issueNumber, "comments")
|
closeURL := path.Join(owner, repo, "issues", issueNumber, "comments")
|
||||||
|
|
||||||
options := map[string]string{
|
options := map[string]string{
|
||||||
"_csrf": htmlDoc.GetCSRF(),
|
"_csrf": htmlDoc.GetCSRF(),
|
||||||
"status": "close",
|
"status": "close",
|
||||||
}
|
}
|
||||||
|
|
||||||
req = NewRequestWithValues(t, "POST", closeUrl, options)
|
req = NewRequestWithValues(t, "POST", closeURL, options)
|
||||||
return session.MakeRequest(t, req, http.StatusOK)
|
return session.MakeRequest(t, req, http.StatusOK)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue