Skip to content

Commit

Permalink
PI-1679 changes to contact notes (#2754)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevomcallister authored Nov 28, 2023
1 parent fab796d commit 6f9dca0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ data class PersonDeparted(
override val urn = "urn:hmpps:cas3:person-departed:$bookingId"
override val noteText = listOfNotNull(
"Departure date: ${DeliusDateFormatter.format(departedAt)}",
notes,
reason,
reasonDetail,
moveOnCategory.description
moveOnCategory.description,
notes
).joinToString(System.lineSeparator())
override val contactTypeCode = ContactType.PERSON_DEPARTED
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ class EventDetailsTest {
applicationId = null,
applicationUrl = null,
bookingId = "A",
bookingUrl = "B",
bookingUrl = "BookingURL",
departedAt = ZonedDateTime.of(2020, 1, 1, 0, 0, 0, 0, EuropeLondon),
notes = "C",
reason = "D",
reasonDetail = null,
moveOnCategory = Category(description = "E")
notes = "Notes",
reason = "Reason",
reasonDetail = "ReasonDetail",
moveOnCategory = Category(description = "MoveOnCat")
)
assertThat(event.noteText, equalTo("Departure date: 01/01/2020${System.lineSeparator()}C${System.lineSeparator()}D${System.lineSeparator()}E"))
assertThat(event.noteText, equalTo("Departure date: 01/01/2020${System.lineSeparator()}Reason${System.lineSeparator()}ReasonDetail${System.lineSeparator()}MoveOnCat${System.lineSeparator()}Notes"))
}
}

0 comments on commit 6f9dca0

Please sign in to comment.