Skip to content

Instantly share code, notes, and snippets.

@ValentinMerlet
Created November 20, 2015 20:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ValentinMerlet/b4bb222cdb31c68fa8a9 to your computer and use it in GitHub Desktop.
Save ValentinMerlet/b4bb222cdb31c68fa8a9 to your computer and use it in GitHub Desktop.
Feature: Testing cars
# Description de la feature
In order to drive
As a api tester
I need to be able to get cars
Background:
# On supprime les données pour les entités suivantes :
Given There is no "AppBundle:Cars" in database
# Et on insère les données suivantes :
Given there are cars
| model | brand | color |
| Polo | Volkswagen | verte |
| Fiesta | Ford | gris |
| Corsa | Opel | blanche |
# Récupération de toutes les voitures
Scenario: Get all cars
When I request "GET /cars"
Then the response status code should be 200
And the "Content-Type" header should be "application/json"
And the "cars" property should be an array
And scope into the first "cars" property
And the following properties should exist:
"""
model
brand
color
"""
And the "model" property should equal "Polo"
And the "brand" property should equal "Ford"
And the "color" property should equal "verte"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment