Skip to content

Commit eaba4b4

Browse files
committed
Add test for custom ticket status ID
The update integrates tests for custom ticket status ID into the Ticket and TicketResult test classes. This ensures that the custom ID property is recognized correctly and can be parsed from JSON appropriately.
1 parent 7d880dc commit eaba4b4

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/test/java/org/zendesk/client/v2/model/TicketResultTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@ private TicketResult parseJson(byte[] json) {
2020

2121
@Test
2222
public void testParseTicketResult() {
23-
String json = "{ \"ticket\": { \"id\": 21337631753}}";
23+
String json = "{ \"ticket\": { \"id\": 21337631753, \"custom_status_id\": 9999}}";
2424
TicketResult ev = parseJson(json.getBytes());
2525
assertNotNull(ev);
26+
assertEquals(Long.valueOf(9999), ev.getTicket().getCustomStatusId());
2627
assertEquals(TicketResult.class, ev.getClass());
2728
}
2829
}

src/test/java/org/zendesk/client/v2/model/TicketTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ private Ticket createSampleTicket() {
4949
ticket.setId(Math.abs(RANDOM.nextLong()));
5050
ticket.setComment(new Comment(TICKET_COMMENT1));
5151
ticket.setUpdatedAt(NOW);
52+
ticket.setCustomStatusId(Math.abs(RANDOM.nextLong()));
5253
return ticket;
5354
}
5455
}

0 commit comments

Comments
 (0)