File tree 5 files changed +37
-0
lines changed
test/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/smoke
5 files changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ authorisation:
60
60
- " /v1/persons/\\ .*+[^/]*$"
61
61
- " /v1/persons/.*/addresses"
62
62
- " /v1/persons/.*/alerts"
63
+ - " /v1/persons/.*/alerts/pnd"
63
64
- " /v1/persons/.*/sentences"
64
65
- " /v1/persons/.*/sentences/latest-key-dates-and-adjustments"
65
66
- " /v1/persons/.*/risks/scores"
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ authorisation:
32
32
- " /v1/persons/.*/addresses"
33
33
- " /v1/persons/.*/offences"
34
34
- " /v1/persons/.*/alerts"
35
+ - " /v1/persons/.*/alerts/pnd"
35
36
- " /v1/persons/.*/sentences"
36
37
- " /v1/persons/.*/sentences/latest-key-dates-and-adjustments"
37
38
- " /v1/persons/.*/risks/scores"
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ authorisation:
39
39
- " /v1/persons/.*/addresses"
40
40
- " /v1/persons/.*/offences"
41
41
- " /v1/persons/.*/alerts"
42
+ - " /v1/persons/.*/alerts/pnd"
42
43
- " /v1/persons/.*/sentences"
43
44
- " /v1/persons/.*/sentences/latest-key-dates-and-adjustments"
44
45
- " /v1/persons/.*/risks/scores"
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ class AuthoriseConfigTest : DescribeSpec(
27
27
"/v1/persons/.*/addresses",
28
28
"/v1/persons/.*/offences",
29
29
"/v1/persons/.*/alerts",
30
+ "/v1/persons/.*/alerts/pnd",
30
31
"/v1/persons/.*/sentences",
31
32
"/v1/persons/.*/sentences/latest-key-dates-and-adjustments",
32
33
"/v1/persons/.*/risks/scores",
Original file line number Diff line number Diff line change @@ -20,6 +20,39 @@ class AlertsSmokeTest : DescribeSpec(
20
20
it("returns alerts for a person") {
21
21
val response = httpClient.performAuthorised(basePath)
22
22
23
+ response.statusCode().shouldBe(HttpStatus .OK .value())
24
+ response.body().shouldEqualJson(
25
+ """
26
+ {
27
+ "data": [
28
+ {
29
+ "offenderNo": "G3878UK ",
30
+ "type": "X ",
31
+ "typeDescription": "Security ",
32
+ "code": "XER ",
33
+ "codeDescription": "Escape Risk ",
34
+ "comment": "Profession lock pick.",
35
+ "dateCreated": "2019-08-20",
36
+ "dateExpired": "2020-08-20",
37
+ "expired": true,
38
+ "active": false
39
+ }
40
+ ],
41
+ "pagination": {
42
+ "isLastPage": true,
43
+ "count": 1,
44
+ "page": 1,
45
+ "perPage": 10,
46
+ "totalCount": 1,
47
+ "totalPages": 1
48
+ }
49
+ }
50
+ """.removeWhitespaceAndNewlines(),
51
+ )
52
+ }
53
+ it("returns PND alerts for a person") {
54
+ val response = httpClient.performAuthorised("$basePath/pnd")
55
+
23
56
response.statusCode().shouldBe(HttpStatus .OK .value())
24
57
response.body().shouldEqualJson(
25
58
"""
You can’t perform that action at this time.
0 commit comments