mirror of
https://gitea.com/gitea/tea.git
synced 2026-10-26 11:01:25 +01:00
fix(pr): keep the body of a pending review when posting another review
Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
2 files changed
+21
-1
No files matched your search
@@ -94,6 +94,10 @@ func TestReviewTypeFlags(t *testing.T) {
|
||||
t.Run(strings.Join(tc.args, " "), func(t *testing.T) {
|
||||
var payload map[string]any
|
||||
server := newAuthenticatedServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
if r.Method == http.MethodGet && r.URL.Path == "/api/v1/repos/alice/x/pulls/13/reviews" {
|
||||
_, _ = w.Write([]byte(`[]`))
|
||||
return
|
||||
}
|
||||
if r.Method == http.MethodGet {
|
||||
require.Equal(t, "/api/v1/repos/alice/x/pulls/13", r.URL.Path)
|
||||
_, _ = w.Write([]byte(pullJSON("bob")))
|
||||
@@ -119,6 +123,10 @@ func TestReviewTypeFlags(t *testing.T) {
|
||||
func TestReviewCreateIsTheReviewCommand(t *testing.T) {
|
||||
var event any
|
||||
server := newAuthenticatedServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
if r.Method == http.MethodGet && r.URL.Path == "/api/v1/repos/alice/x/pulls/13/reviews" {
|
||||
_, _ = w.Write([]byte(`[]`))
|
||||
return
|
||||
}
|
||||
if r.Method == http.MethodGet {
|
||||
_, _ = w.Write([]byte(pullJSON("bob")))
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user