Skip to content

Commit

Permalink
PI-1878: Added DOB to MAS (#3402)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmcphee77 authored Feb 29, 2024
1 parent e0502bf commit 0d2a319
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ internal class OverviewIntegrationTest {
assertThat(res.sentences[0].rar?.completed, equalTo(1))
assertThat(res.sentences[0].rar?.scheduled, equalTo(1))
assertThat(res.sentences[0].rar?.totalDays, equalTo(2))
assertThat(res.personalDetails.dateOfBirth, equalTo(OVERVIEW.dateOfBirth))
}

@Test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package uk.gov.justice.digital.hmpps.api.model.overview

import uk.gov.justice.digital.hmpps.api.model.Name
import java.time.LocalDate

data class PersonalDetails(
val name: Name,
val preferredGender: String,
val dateOfBirth: LocalDate,
val preferredName: String?,
val telephoneNumber: String?,
val mobileNumber: String?,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class OverviewService(
preferredName = preferredName,
personalCircumstances = personalCircumstances.map { it.toPersonalCircumstance() },
disabilities = disabilities.map { it.toDisability() },
dateOfBirth = dateOfBirth,
provisions = provisions.map { it.toProvision() },
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import uk.gov.justice.digital.hmpps.api.model.overview.PersonalDetails
import uk.gov.justice.digital.hmpps.api.model.overview.PreviousOrders
import uk.gov.justice.digital.hmpps.api.model.overview.Schedule
import uk.gov.justice.digital.hmpps.service.OverviewService
import java.time.LocalDate

@ExtendWith(MockitoExtension::class)
internal class OverviewControllerTest {
Expand All @@ -35,6 +36,7 @@ internal class OverviewControllerTest {
preferredGender = "Prefer not to say",
preferredName = "Joe",
telephoneNumber = "1234",
dateOfBirth = LocalDate.now().minusYears(50),
provisions = emptyList()
)
val overview = Overview(
Expand Down

0 comments on commit 0d2a319

Please sign in to comment.