diff options
author | Ethan Koenig <ethantkoenig@gmail.com> | 2017-11-19 23:24:07 -0800 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-11-20 15:24:07 +0800 |
commit | c3b6383b3a91e476c5a6978a0fb355191271a51c (patch) | |
tree | b2111b8ae76b875a653033c1e7686d4cbdb38541 /integrations/api_comment_test.go | |
parent | 876bafb7ef8570e62de026b999acd05556fceaee (diff) | |
download | gitea-c3b6383b3a91e476c5a6978a0fb355191271a51c.tar.gz gitea-c3b6383b3a91e476c5a6978a0fb355191271a51c.zip |
Fix comment API paths (#2813)
Diffstat (limited to 'integrations/api_comment_test.go')
-rw-r--r-- | integrations/api_comment_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/integrations/api_comment_test.go b/integrations/api_comment_test.go index 645afba189..423d0f7989 100644 --- a/integrations/api_comment_test.go +++ b/integrations/api_comment_test.go @@ -93,8 +93,8 @@ func TestAPIEditComment(t *testing.T) { repoOwner := models.AssertExistsAndLoadBean(t, &models.User{ID: repo.OwnerID}).(*models.User) session := loginUser(t, repoOwner.Name) - urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/comments/%d", - repoOwner.Name, repo.Name, issue.Index, comment.ID) + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/issues/comments/%d", + repoOwner.Name, repo.Name, comment.ID) req := NewRequestWithValues(t, "PATCH", urlStr, map[string]string{ "body": newCommentBody, }) @@ -117,8 +117,8 @@ func TestAPIDeleteComment(t *testing.T) { repoOwner := models.AssertExistsAndLoadBean(t, &models.User{ID: repo.OwnerID}).(*models.User) session := loginUser(t, repoOwner.Name) - req := NewRequestf(t, "DELETE", "/api/v1/repos/%s/%s/issues/%d/comments/%d", - repoOwner.Name, repo.Name, issue.Index, comment.ID) + req := NewRequestf(t, "DELETE", "/api/v1/repos/%s/%s/issues/comments/%d", + repoOwner.Name, repo.Name, comment.ID) session.MakeRequest(t, req, http.StatusNoContent) models.AssertNotExistsBean(t, &models.Comment{ID: comment.ID}) |