Skip to content

Instantly share code, notes, and snippets.

@Zayon
Created December 31, 2018 16:09
Show Gist options
  • Save Zayon/d82ae68e6bbbfb6b9f128111a43e33b3 to your computer and use it in GitHub Desktop.
Save Zayon/d82ae68e6bbbfb6b9f128111a43e33b3 to your computer and use it in GitHub Desktop.
Fixtures - list-product.feature
@product @list-products
Feature:
In order to select products
As a customer
I want to see the products available
Background:
Given the fixtures file "list-products.yaml" is loaded
Scenario: List all products
When I send a "GET" request to "/products/"
Then the response status code should be 200
And the response should be in JSON
And the JSON node "total" should be equal to the number 15
Scenario: List products of a given category
When I send a "GET" request to "/products/" with parameters:
| key | value |
| category | tools |
Then the response status code should be 200
And the response should be in JSON
And the JSON node "total" should be equal to the number 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment