Skip to content

Commit 1a6b33a

Browse files
committed
NRL-791 add custodian suffix int test
1 parent 78d318e commit 1a6b33a

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

tests/features/producer/createDocumentReference-failure.feature

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,3 +1044,40 @@ Feature: Producer - createDocumentReference - Failure Scenarios
10441044
"expression": ["DocumentReference"]
10451045
}
10461046
"""
1047+
1048+
Scenario: Custodian suffix is rejected with a .
1049+
Given the application 'DataShare' (ID 'z00z-y11y-x22x') is registered to access the API
1050+
And the organisation 'ANGY1' is authorised to access pointer types:
1051+
| system | value |
1052+
| http://snomed.info/sct | 736253002 |
1053+
When producer 'ANGY1' creates a DocumentReference with values:
1054+
| property | value |
1055+
| subject | 9999999999 |
1056+
| status | current |
1057+
| type | 736253002 |
1058+
| category | 734163000 |
1059+
| custodian | ANGY1.abcsuffix |
1060+
| author | HAR1 |
1061+
| url | https://example.org/my-doc.pdf |
1062+
Then the response status code is 422
1063+
And the response is an OperationOutcome with 1 issue
1064+
And the OperationOutcome contains the issue:
1065+
"""
1066+
{
1067+
"severity": "error",
1068+
"code": "business-rule",
1069+
"details": {
1070+
"coding": [
1071+
{
1072+
"system": "https://fhir.nhs.uk/ValueSet/Spine-ErrorOrWarningCode-1",
1073+
"code": "UNPROCESSABLE_ENTITY",
1074+
"display": "Unprocessable Entity"
1075+
}
1076+
]
1077+
},
1078+
"diagnostics": "The custodian of the provided DocumentReference does not match the expected ODS code for this organisation",
1079+
"expression": [
1080+
"custodian.identifier.value"
1081+
]
1082+
}
1083+
"""

0 commit comments

Comments
 (0)