Skip to content

Commit 6dd5c55

Browse files
committed
[release/2024-10-16] fix-forward: update read device ref data tests
1 parent 3a460b4 commit 6dd5c55

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

src/api/tests/feature_tests/features/readDeviceReferenceData.failure.feature

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,27 @@ Feature: Read Device Reference Data - failure scenarios
5555
| name | value |
5656
| Content-Type | application/json |
5757
| Content-Length | 140 |
58+
59+
Scenario: Read an unknown DeviceReferenceData
60+
Given I have already made a "POST" request with "default" headers to "ProductTeam" with body:
61+
| path | value |
62+
| name | My Great Product Team |
63+
| ods_code | F5H1R |
64+
And I note the response field "$.id" as "product_team_id"
65+
And I have already made a "POST" request with "default" headers to "ProductTeam/${ note(product_team_id) }/Product" with body:
66+
| path | value |
67+
| product_name | My Great Product |
68+
And I note the response field "$.id" as "product_id"
69+
And I have already made a "POST" request with "default" headers to "ProductTeam/${ note(product_team_id) }/Product/${ note(product_id) }/DeviceReferenceData" with body:
70+
| path | value |
71+
| name | My Device Reference Data |
72+
And I note the response field "$.id" as "device_reference_data_id"
73+
When I make a "GET" request with "default" headers to "ProductTeam/${ note(product_team_id) }/Product/${ note(product_id) }/DeviceReferenceData/not-a-device-reference-data"
74+
Then I receive a status code "404" with body
75+
| path | value |
76+
| errors.0.code | RESOURCE_NOT_FOUND |
77+
| errors.0.message | Could not find DeviceReferenceData for key ('${ note(product_team_id) }', '${ note(product_id) }', 'not-a-device-reference-data') |
78+
And the response headers contain:
79+
| name | value |
80+
| Content-Type | application/json |
81+
| Content-Length | 192 |

0 commit comments

Comments
 (0)