Skip to content

Commit c0b0b6a

Browse files
robg-nhsrobg-test
andauthored
[NDR-237] Use Json Snapshots for API Testing (#769)
Co-authored-by: Robert Gaskin <[email protected]>
1 parent 5f30af1 commit c0b0b6a

23 files changed

+664
-700
lines changed

lambdas/tests/e2e/api/__snapshots__/test_retrieve_document_api.ambr

Lines changed: 0 additions & 163 deletions
This file was deleted.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"author": [
3+
{
4+
"identifier": {
5+
"system": "https://fhir.nhs.uk/Id/ods-organization-code",
6+
"value": "H81109"
7+
}
8+
}
9+
],
10+
"content": [
11+
{
12+
"attachment": {
13+
"contentType": "application/pdf",
14+
"creation": "2023-01-01",
15+
"language": "en-GB",
16+
"size": 10737418240,
17+
"title": "1of1_Lloyd_George_Record_[Holly Lorna MAGAN]_[9449305943]_[29-05-2006].pdf"
18+
}
19+
}
20+
],
21+
"custodian": {
22+
"identifier": {
23+
"system": "https://fhir.nhs.uk/Id/ods-organization-code",
24+
"value": "H81109"
25+
}
26+
},
27+
"docStatus": "final",
28+
"resourceType": "DocumentReference",
29+
"status": "current",
30+
"subject": {
31+
"identifier": {
32+
"system": "https://fhir.nhs.uk/Id/nhs-number",
33+
"value": "9449305943"
34+
}
35+
},
36+
"type": {
37+
"coding": [
38+
{
39+
"code": "16521000000101",
40+
"display": "Lloyd George record folder",
41+
"system": "http://snomed.info/sct"
42+
}
43+
]
44+
}
45+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"issue": [
3+
{
4+
"code": "exception",
5+
"details": {
6+
"coding": [
7+
{
8+
"code": "RESOURCE_NOT_FOUND",
9+
"display": "Resource not found",
10+
"system": "https://fhir.hl7.org.uk/CodeSystem/UKCore-SpineErrorOrWarningCode"
11+
}
12+
]
13+
},
14+
"diagnostics": "Document reference not found",
15+
"severity": "error"
16+
}
17+
],
18+
"resourceType": "OperationOutcome"
19+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"author": [
3+
{
4+
"identifier": {
5+
"system": "https://fhir.nhs.uk/Id/ods-organization-code",
6+
"value": "H81109"
7+
}
8+
}
9+
],
10+
"content": [
11+
{
12+
"attachment": {
13+
"contentType": "application/pdf",
14+
"creation": "2023-01-01",
15+
"language": "en-GB",
16+
"title": "1of1_Lloyd_George_Record_[Holly Lorna MAGAN]_[9449305943]_[29-05-2006].pdf"
17+
}
18+
}
19+
],
20+
"custodian": {
21+
"identifier": {
22+
"system": "https://fhir.nhs.uk/Id/ods-organization-code",
23+
"value": "H81109"
24+
}
25+
},
26+
"docStatus": "preliminary",
27+
"resourceType": "DocumentReference",
28+
"status": "current",
29+
"subject": {
30+
"identifier": {
31+
"system": "https://fhir.nhs.uk/Id/nhs-number",
32+
"value": "9449305943"
33+
}
34+
},
35+
"type": {
36+
"coding": [
37+
{
38+
"code": "16521000000101",
39+
"display": "Lloyd George record folder",
40+
"system": "http://snomed.info/sct"
41+
}
42+
]
43+
}
44+
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"author": [
3+
{
4+
"identifier": {
5+
"system": "https://fhir.nhs.uk/Id/ods-organization-code",
6+
"value": "H81109"
7+
}
8+
}
9+
],
10+
"content": [
11+
{
12+
"attachment": {
13+
"contentType": "application/pdf",
14+
"creation": "2023-01-01",
15+
"data": "U2FtcGxlIFBERiBDb250ZW50",
16+
"language": "en-GB",
17+
"size": 12345,
18+
"title": "1of1_Lloyd_George_Record_[Holly Lorna MAGAN]_[9449305943]_[29-05-2006].pdf"
19+
}
20+
}
21+
],
22+
"custodian": {
23+
"identifier": {
24+
"system": "https://fhir.nhs.uk/Id/ods-organization-code",
25+
"value": "H81109"
26+
}
27+
},
28+
"docStatus": "final",
29+
"resourceType": "DocumentReference",
30+
"status": "current",
31+
"subject": {
32+
"identifier": {
33+
"system": "https://fhir.nhs.uk/Id/nhs-number",
34+
"value": "9449305943"
35+
}
36+
},
37+
"type": {
38+
"coding": [
39+
{
40+
"code": "16521000000101",
41+
"display": "Lloyd George record folder",
42+
"system": "http://snomed.info/sct"
43+
}
44+
]
45+
}
46+
}

0 commit comments

Comments
 (0)