From d0bafb677537e3248c4d1d0bf9c55fd78bfe3bf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Dachary?= Date: Sun, 26 Nov 2023 06:33:47 +0100 Subject: [PATCH] Revert "test {DELETE,POST} /repos/{owner}/{repo}/issues/comments/{id}/reactions" This reverts commit f59a6cc0e46b275b5f3b418b5a6f79c9a5c1ebc9. --- tests/integration/api_issue_reaction_test.go | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/tests/integration/api_issue_reaction_test.go b/tests/integration/api_issue_reaction_test.go index a7764223b1..7d3ee2d154 100644 --- a/tests/integration/api_issue_reaction_test.go +++ b/tests/integration/api_issue_reaction_test.go @@ -12,7 +12,6 @@ import ( auth_model "code.gitea.io/gitea/models/auth" "code.gitea.io/gitea/models/db" issues_model "code.gitea.io/gitea/models/issues" - repo_model "code.gitea.io/gitea/models/repo" "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" api "code.gitea.io/gitea/modules/structs" @@ -108,24 +107,6 @@ func TestAPICommentReactions(t *testing.T) { }) MakeRequest(t, req, http.StatusOK) - t.Run("UnrelatedCommentID", func(t *testing.T) { - // Using the ID of a comment that does not belong to the repository must fail - repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 4}) - repoOwner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) - token := getUserToken(t, repoOwner.Name, auth_model.AccessTokenScopeWriteIssue) - urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/issues/comments/%d/reactions?token=%s", - repoOwner.Name, repo.Name, comment.ID, token) - req = NewRequestWithJSON(t, "POST", urlStr, &api.EditReactionOption{ - Reaction: "+1", - }) - MakeRequest(t, req, http.StatusNotFound) - - req = NewRequestWithJSON(t, "DELETE", urlStr, &api.EditReactionOption{ - Reaction: "+1", - }) - MakeRequest(t, req, http.StatusNotFound) - }) - // Add allowed reaction req = NewRequestWithJSON(t, "POST", urlStr, &api.EditReactionOption{ Reaction: "+1",