Skip to content

Commit 7c50381

Browse files
author
Bingjie Liu
committed
Fix unit tests
1 parent d412bda commit 7c50381

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/test/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/services/GetProtectedCharacteristicsServiceTest.kt

+1-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class GetProtectedCharacteristicsServiceTest() {
6262

6363
@Test
6464
fun `Probation offender search return no nomsNumber, return only probation data`() {
65-
val mockOffender: Offender = Offender("John", "Smith", otherIds = OtherIds(nomsNumber = "mockNomsNumber"), age = 35, gender = "Male", offenderProfile = OffenderProfile(sexualOrientation = "Unknown", ethnicity = "British", nationality = "British", religion = "None", disabilities = emptyList()))
65+
val mockOffender: Offender = Offender("John", "Smith", otherIds = OtherIds(), age = 35, gender = "Male", offenderProfile = OffenderProfile(sexualOrientation = "Unknown", ethnicity = "British", nationality = "British", religion = "None", disabilities = emptyList()))
6666
whenever(probationOffenderSearchGateway.getOffender(hmppsId)).thenReturn(Response<Offender?>(data = mockOffender, errors = emptyList()))
6767

6868
val result = service.execute(hmppsId)
@@ -113,7 +113,6 @@ class GetProtectedCharacteristicsServiceTest() {
113113

114114
val result = service.execute(hmppsId)
115115

116-
verifyNoInteractions(nomisGateway)
117116
result.data.shouldNotBeNull()
118117
result.errors.shouldHaveSize(0)
119118
result.data!!.age.shouldBe(35)

0 commit comments

Comments
 (0)