From 027e3a72069dc0c53920f2859bd4fa90f726ee59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Dachary?= Date: Sun, 26 Nov 2023 06:33:39 +0100 Subject: [PATCH] Revert "test POST /{owner}/{repo}/comments/{id}" This reverts commit 0d7893ca8a0d5784b6d4282091910ba004dc37cc. --- tests/integration/issue_test.go | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/tests/integration/issue_test.go b/tests/integration/issue_test.go index 0ba895b4cc..be12cb2b73 100644 --- a/tests/integration/issue_test.go +++ b/tests/integration/issue_test.go @@ -229,37 +229,6 @@ func TestIssueCommentDelete(t *testing.T) { unittest.AssertNotExistsBean(t, &issues_model.Comment{ID: commentID}) } -func TestIssueCommentUpdate(t *testing.T) { - defer tests.PrepareTestEnv(t)() - session := loginUser(t, "user2") - issueURL := testNewIssue(t, session, "user2", "repo1", "Title", "Description") - comment1 := "Test comment 1" - commentID := testIssueAddComment(t, session, issueURL, comment1, "") - - comment := unittest.AssertExistsAndLoadBean(t, &issues_model.Comment{ID: commentID}) - assert.Equal(t, comment1, comment.Content) - - modifiedContent := comment.Content + "MODIFIED" - - // Using the ID of a comment that does not belong to the repository must fail - req := NewRequestWithValues(t, "POST", fmt.Sprintf("/%s/%s/comments/%d", "user5", "repo4", commentID), map[string]string{ - "_csrf": GetCSRF(t, session, issueURL), - "content": modifiedContent, - }) - session.MakeRequest(t, req, http.StatusNotFound) - commentIdentical := unittest.AssertExistsAndLoadBean(t, &issues_model.Comment{ID: commentID}) - assert.Equal(t, comment1, commentIdentical.Content) - - req = NewRequestWithValues(t, "POST", fmt.Sprintf("/%s/%s/comments/%d", "user2", "repo1", commentID), map[string]string{ - "_csrf": GetCSRF(t, session, issueURL), - "content": modifiedContent, - }) - session.MakeRequest(t, req, http.StatusOK) - - comment = unittest.AssertExistsAndLoadBean(t, &issues_model.Comment{ID: commentID}) - assert.Equal(t, modifiedContent, comment.Content) -} - func TestIssueReaction(t *testing.T) { defer tests.PrepareTestEnv(t)() session := loginUser(t, "user2")