Skip to content

Commit e4dd348

Browse files
committed
PI-2517 - update integration tests
1 parent 80cf1a3 commit e4dd348

File tree

4 files changed

+101
-2
lines changed

4 files changed

+101
-2
lines changed

src/test/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/integration/person/RisksIntegrationTest.kt

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package uk.gov.justice.digital.hmpps.hmppsintegrationapi.integration.person
22

3-
import org.junit.jupiter.api.Test
43
import org.junit.jupiter.params.ParameterizedTest
54
import org.junit.jupiter.params.provider.ValueSource
65
import org.springframework.test.web.servlet.result.MockMvcResultMatchers.content
@@ -10,7 +9,7 @@ import uk.gov.justice.digital.hmpps.hmppsintegrationapi.integration.IntegrationT
109
class RisksIntegrationTest : IntegrationTestBase() {
1110

1211
@ParameterizedTest
13-
@ValueSource(strings = ["scores", "categories"])
12+
@ValueSource(strings = ["scores", "categories", "mappadetail", "dynamic", "serious-harm"])
1413
fun `returns protected characteristics for a person`(path: String) {
1514
callApi("$basePath/$crn/risks/$path")
1615
.andExpect(status().isOk)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"data": [
3+
{
4+
"code": "RCCO",
5+
"description": "Child Concerns",
6+
"startDate": "2019-08-24",
7+
"reviewDate": "2019-08-24",
8+
"notes": "string"
9+
}
10+
],
11+
"pagination": {
12+
"isLastPage": true,
13+
"count": 1,
14+
"page": 1,
15+
"perPage": 10,
16+
"totalCount": 1,
17+
"totalPages": 1
18+
}
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"data": {
3+
"level": -2147483648,
4+
"levelDescription": "string",
5+
"category": -2147483648,
6+
"categoryDescription": "string",
7+
"startDate": "2019-08-24",
8+
"reviewDate": "2019-08-24",
9+
"notes": "string"
10+
}
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{
2+
"data": {
3+
"assessedOn": "2024-09-04T01:01:29",
4+
"riskToSelf": {
5+
"suicide": {
6+
"risk": "YES",
7+
"previous": "YES",
8+
"previousConcernsText": "Risk of self harms concerns due to ...",
9+
"current": "YES",
10+
"currentConcernsText": "Risk of self harms concerns due to ..."
11+
},
12+
"selfHarm": {
13+
"risk": "YES",
14+
"previous": "YES",
15+
"previousConcernsText": "Risk of self harms concerns due to ...",
16+
"current": "YES",
17+
"currentConcernsText": "Risk of self harms concerns due to ..."
18+
},
19+
"custody": {
20+
"risk": "Yes, No, Don't know, null",
21+
"previous": "Yes, No, Don't know",
22+
"previousConcernsText": "Risk of self harms concerns due to ...",
23+
"current": "Yes, No, Don't know",
24+
"currentConcernsText": "Risk of self harms concerns due to ..."
25+
},
26+
"hostelSetting": {
27+
"risk": "Yes, No, Don't know, null",
28+
"previous": "Yes, No, Don't know",
29+
"previousConcernsText": "Risk of self harms concerns due to ...",
30+
"current": "Yes, No, Don't know",
31+
"currentConcernsText": "Risk of self harms concerns due to ..."
32+
},
33+
"vulnerability": {
34+
"risk": "Yes, No, Don't know, null",
35+
"previous": "Yes, No, Don't know",
36+
"previousConcernsText": "Risk of self harms concerns due to ...",
37+
"current": "Yes, No, Don't know",
38+
"currentConcernsText": "Risk of self harms concerns due to ..."
39+
}
40+
},
41+
"otherRisks": {
42+
"escapeOrAbscond": "YES",
43+
"controlIssuesDisruptiveBehaviour": "YES",
44+
"breachOfTrust": "YES",
45+
"riskToOtherPrisoners": "YES"
46+
},
47+
"summary": {
48+
"whoIsAtRisk": "X, Y and Z are at risk",
49+
"natureOfRisk": "The nature of the risk is X",
50+
"riskImminence": "the risk is imminent and more probably in X situation",
51+
"riskIncreaseFactors": "If offender in situation X the risk can be higher",
52+
"riskMitigationFactors": "Giving offender therapy in X will reduce the risk",
53+
"overallRiskLevel": "VERY_HIGH",
54+
"riskInCommunity": {
55+
"children": "HIGH ",
56+
"public": "HIGH ",
57+
"knowAdult": "HIGH ",
58+
"staff": "MEDIUM",
59+
"prisoners": "LOW"
60+
},
61+
"riskInCustody": {
62+
"knowAdult": "HIGH ",
63+
"staff": "VERY_HIGH",
64+
"prisoners": "VERY_HIGH",
65+
"children": "LOW",
66+
"public": "LOW"
67+
}
68+
}
69+
}
70+
}

0 commit comments

Comments
 (0)