Skip to content

Commit 7a4c4c2

Browse files
committed
updated postman tests following decision on invalid system error
1 parent 5c399f0 commit 7a4c4c2

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

postman/Validate_Relationship_Service_Sandbox.postman_collection.json

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"info": {
3-
"_postman_id": "d10b7033-cf96-475e-a238-e3d6c29833d7",
3+
"_postman_id": "9040fff5-c55f-4c49-8fe3-95bc641eeb5c",
44
"name": "Validate Relationship Service Sandbox",
55
"description": "Example usage of the Validate Relationship Service (VRS) sandbox.\n\nFull specification is available at [https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service)",
66
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
@@ -999,26 +999,26 @@
999999
"listen": "test",
10001000
"script": {
10011001
"exec": [
1002-
"const expectedResponseBody = {",
1003-
" \"issue\": [",
1004-
" {",
1005-
" \"code\": \"invalid\",",
1006-
" \"details\": {",
1007-
" \"coding\": [",
1008-
" {",
1009-
" \"code\": \"INVALID_IDENTIFIER_SYSTEM\",",
1010-
" \"display\": \"Invalid identifier system\",",
1011-
" \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",",
1012-
" \"version\": \"1\"",
1013-
" }",
1014-
" ]",
1015-
" },",
1016-
" \"diagnostics\": \"The identifier system is not valid\",",
1017-
" \"severity\": \"error\"",
1018-
" }",
1019-
" ],",
1020-
" \"resourceType\": \"OperationOutcome\"",
1021-
"}",
1002+
"var expectedResponseBody = {",
1003+
" \"issue\": [",
1004+
" {",
1005+
" \"code\": \"invalid\",",
1006+
" \"details\": {",
1007+
" \"coding\": [",
1008+
" {",
1009+
" \"code\": \"INVALID_IDENTIFIER_VALUE\",",
1010+
" \"display\": \"Provided value is invalid\",",
1011+
" \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",",
1012+
" \"version\": \"1\"",
1013+
" }",
1014+
" ]",
1015+
" },",
1016+
" \"diagnostics\": \"Not a valid NHS Number provided for the 'identifier' parameter\",",
1017+
" \"severity\": \"error\"",
1018+
" }",
1019+
" ],",
1020+
" \"resourceType\": \"OperationOutcome\"",
1021+
"};",
10221022
"",
10231023
"const responseJson = pm.response.json();",
10241024
"",
@@ -1027,7 +1027,7 @@
10271027
"});",
10281028
"",
10291029
"pm.test(\"Should have correct error response\", () => {",
1030-
" pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALID_IDENTIFIER_SYSTEM\");",
1030+
" pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALID_IDENTIFIER_VALUE\");",
10311031
"});",
10321032
"",
10331033
"pm.test(\"Should have correct response body\", () => {",
@@ -1445,4 +1445,4 @@
14451445
"type": "string"
14461446
}
14471447
]
1448-
}
1448+
}

0 commit comments

Comments
 (0)