diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2016-12-14 19:28:38 +0100 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2016-12-15 14:45:04 +0100 |
commit | 251930ec8326956a505bfe2ef6863c5a423fbe14 (patch) | |
tree | f711bad773894c1f52505a30eebed86b76bb15cd /it/it-tests | |
parent | 6e6f004f24142e3739c892bbee9153c26a51d0a1 (diff) | |
download | sonarqube-251930ec8326956a505bfe2ef6863c5a423fbe14.tar.gz sonarqube-251930ec8326956a505bfe2ef6863c5a423fbe14.zip |
SONAR-7293 Replace Ruby WS api/issues/delete_comment by Java WS
Diffstat (limited to 'it/it-tests')
-rw-r--r-- | it/it-tests/src/test/java/it/issue/IssueActionTest.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/it/it-tests/src/test/java/it/issue/IssueActionTest.java b/it/it-tests/src/test/java/it/issue/IssueActionTest.java index 86b70342e85..0932a4ceb7f 100644 --- a/it/it-tests/src/test/java/it/issue/IssueActionTest.java +++ b/it/it-tests/src/test/java/it/issue/IssueActionTest.java @@ -116,6 +116,17 @@ public class IssueActionTest extends AbstractIssueTest { assertThat(reloaded.getComments().getComments(0).getHtmlText()).isEqualTo("new <strong>comment</strong>"); } + @Test + public void delete_comment() throws Exception { + Issues.Comment comment = issuesService.addComment(new AddCommentRequest(randomIssue.getKey(), "this is my *comment*")).getIssue().getComments().getComments(0); + Issue issue = issuesService.deleteComment(comment.getKey()).getIssue(); + assertThat(issue.getComments().getCommentsList()).isEmpty(); + + // reload issue + Issue reloaded = issueRule.getByKey(randomIssue.getKey()); + assertThat(reloaded.getComments().getCommentsList()).isEmpty(); + } + /** * SONAR-4352 */ |