Skip to content

Commit c8fb6bf

Browse files
committed
Add can't read deleted product scenario
1 parent 90619f8 commit c8fb6bf

File tree

2 files changed

+23
-23
lines changed

2 files changed

+23
-23
lines changed

infrastructure/swagger/05_paths.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ paths:
372372
- $ref: "#/components/parameters/ProductTeamId"
373373
- $ref: "#/components/parameters/ProductId"
374374
tags:
375-
- Core Product ID Endpoints
375+
- Options
376376
responses:
377377
"400":
378378
$ref: "#/components/responses/BadRequest"

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

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,25 @@ Feature: Read CPM Product - failure scenarios
2525
| Content-Type | application/json |
2626
| Content-Length | 106 |
2727

28-
# Scenario: Can't read a deleted Product
29-
# Given I have already made a "POST" request with "default" headers to "ProductTeam" with body:
30-
# | path | value |
31-
# | name | My Great Product Team |
32-
# | ods_code | F5H1R |
33-
# | keys.0.key_type | product_team_id_alias |
34-
# | keys.0.key_value | FOOBAR |
35-
# Given I note the response field "$.id" as "product_team_id"
36-
# And I have already made a "POST" request with "default" headers to "ProductTeam/${ note(product_team_id) }/Product" with body:
37-
# | path | value |
38-
# | name | My Great Product |
39-
# And I note the response field "$.id" as "product_id"
40-
# And I have already made a "DELETE" request with "default" headers to "ProductTeam/${ note(product_team_id) }/Product/${ note(product_id) }"
41-
# When I make a "GET" request with "default" headers to "ProductTeam/${ note(product_team_id) }/Product/${ note(product_id) }"
42-
# Then I receive a status code "404" with body
43-
# | path | value |
44-
# | errors.0.code | RESOURCE_NOT_FOUND |
45-
# | errors.0.message | Could not find CpmProduct for key ('${ note(product_team_id) }', '${ note(product_id) }') |
46-
# And the response headers contain:
47-
# | name | value |
48-
# | Content-Type | application/json |
49-
# | Content-Length | 146 |
28+
Scenario: Can't read a deleted Product
29+
Given I have already made a "POST" request with "default" headers to "ProductTeam" with body:
30+
| path | value |
31+
| name | My Great Product Team |
32+
| ods_code | F5H1R |
33+
| keys.0.key_type | product_team_id |
34+
| keys.0.key_value | 8babe222-5c78-42c6-8aa6-a3c69943030a |
35+
Given I note the response field "$.id" as "product_team_id"
36+
And I have already made a "POST" request with "default" headers to "ProductTeam/${ note(product_team_id) }/Product" with body:
37+
| path | value |
38+
| name | My Great Product |
39+
And I note the response field "$.id" as "product_id"
40+
And I have already made a "DELETE" request with "default" headers to "ProductTeam/${ note(product_team_id) }/Product/${ note(product_id) }"
41+
When I make a "GET" request with "default" headers to "Product/${ note(product_id) }"
42+
Then I receive a status code "404" with body
43+
| path | value |
44+
| errors.0.code | RESOURCE_NOT_FOUND |
45+
| errors.0.message | Could not find CpmProduct for key ('${ note(product_id) }') |
46+
And the response headers contain:
47+
| name | value |
48+
| Content-Type | application/json |
49+
| Content-Length | 106 |

0 commit comments

Comments
 (0)