Skip to content

Commit

Permalink
Adjust tests
Browse files Browse the repository at this point in the history
  • Loading branch information
strassl committed Jan 30, 2017
1 parent fda17e7 commit 814dad2
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ class TicketApiTest : ApiBaseTest() {
}

@Test
fun `update with initial not set should clear estimated and initial`() {
fun `update with initial not set but current set should update estimated (and current if null)`() {
withUser(ADMIN_ID) { p ->
val create = CreateTicketRequestJson("title", true, null, null, null, null, "description",
PROJECT_AOU_AUO_ID, emptyList(), emptyList(), emptyList(), null, emptyList())
Expand All @@ -236,8 +236,8 @@ class TicketApiTest : ApiBaseTest() {
val req = UpdateTicketRequestJson(null, null, null, null, UpdateNullableValueJson(Duration.ofDays(2)), null, null, null, null)
val result = ticketController.updateTicket(req, ticket.id, p)

assertNull(result.initialEstimatedTime)
assertNull(result.currentEstimatedTime)
assertEquals(req.currentEstimatedTime!!.value, result.initialEstimatedTime)
assertEquals(req.currentEstimatedTime!!.value, result.initialEstimatedTime)
}
}

Expand Down

0 comments on commit 814dad2

Please sign in to comment.