IDEA-126470 Filed 'description' in Redmine issues may be missing

This commit is contained in:
Mikhail Golubev
2014-09-01 17:53:50 +04:00
parent 20f796bd67
commit 95e25d2841
2 changed files with 12 additions and 4 deletions
@@ -19,7 +19,7 @@ public class RedmineIssue {
private IssueStatus status;
@Mandatory
private String subject;
@Mandatory
// IDEA-126470 May be missing if issue was not created via web-interface
private String description;
@SerializedName("done_ratio")
private int doneRatio;
@@ -45,7 +45,7 @@ public class RedmineIssue {
return subject;
}
@NotNull
@Nullable
public String getDescription() {
return description;
}
@@ -21,11 +21,11 @@ public class RedmineIntegrationTest extends TaskManagerTestCase {
// with closed issues
Task[] found = myRepository.getIssues(null, 0, 25, true);
assertEquals(4, found.length);
assertEquals(5, found.length);
// without closed issues
found = myRepository.getIssues(null, 0, 25, false);
assertEquals(3, found.length);
assertEquals(4, found.length);
// unique summary
//found = myRepository.getIssues("baz", 0, 25, true);
@@ -72,6 +72,14 @@ public class RedmineIntegrationTest extends TaskManagerTestCase {
}
}
// IDEA-126470
public void testIssueWithMissingDescription() throws Exception {
final Task issue = myRepository.findTask("8");
assertNotNull(issue);
assertNull(issue.getDescription());
assertEquals(issue.getSummary(), "Artificial issue with no description created via REST API");
}
@Override
public void setUp() throws Exception {
super.setUp();