Skip to content

Commit

Permalink
Amend contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeyklay committed Feb 5, 2023
1 parent 073613f commit f9ee904
Showing 1 changed file with 27 additions and 7 deletions.
34 changes: 27 additions & 7 deletions contracts/products.spec
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,33 @@ Feature: Products API
| 1 | application/json |
| 4 | application/json |

Scenario Outline: Products List Success
When GET /v1/products?category=(category:string)&q=(q:string)
Scenario Outline: Successful getting list of products
When GET /v1/products
And request-header Accept? (string)
Then status 200
Examples:
| Accept | category | q |
| application/json | | samsung |
| application/json | laptops | |
| */* | smartphones | HP |
| */* | | |
| Accept |
| application/json |
| */* |

Scenario Outline: Successful getting list of products in a given category
When GET /v1/products?category=(category:string)
And request-header Accept? (string)
Then status 200
Examples:
| Accept | category |
| application/json | smartphones |
| application/json | laptops |
| */* | smartphones |
| */* | |

Scenario Outline: Successful getting list of products using search term
When GET /v1/products?q=(q:string)
And request-header Accept? (string)
Then status 200
Examples:
| Accept | q |
| application/json | phone |
| application/json | |
| */* | HP |
| */* | |

0 comments on commit f9ee904

Please sign in to comment.