diff options
author | Kevin Walter <kevin.walter.private@googlemail.com> | 2014-04-15 02:00:42 +0200 |
---|---|---|
committer | Kevin Walter <kevin.walter.private@googlemail.com> | 2014-04-15 02:07:02 +0200 |
commit | 4868740ed7f40ce0cf162f17a8224856ae10a4b0 (patch) | |
tree | 9c0e0694aaef47ab06562753b5434b552baaacf3 /src/test | |
parent | d3b1e34c7428fbe4ef3abeee9eaef0f885c3f19b (diff) | |
download | gitblit-4868740ed7f40ce0cf162f17a8224856ae10a4b0.tar.gz gitblit-4868740ed7f40ce0cf162f17a8224856ae10a4b0.zip |
fix NullPointerException in ITicketService and add TestCase
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/com/gitblit/tests/TicketServiceTest.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/java/com/gitblit/tests/TicketServiceTest.java b/src/test/java/com/gitblit/tests/TicketServiceTest.java index 5f94a46e..d91ce533 100644 --- a/src/test/java/com/gitblit/tests/TicketServiceTest.java +++ b/src/test/java/com/gitblit/tests/TicketServiceTest.java @@ -92,6 +92,10 @@ public abstract class TicketServiceTest extends GitblitUnitTest { @Test
public void testLifecycle() throws Exception {
+ // query non-existent ticket
+ TicketModel nonExistent = service.getTicket(getRepository(), 0);
+ assertNull(nonExistent);
+
// create and insert a ticket
Change c1 = newChange("testCreation() " + Long.toHexString(System.currentTimeMillis()));
TicketModel ticket = service.createTicket(getRepository(), c1);
|