Skip to content

Instantly share code, notes, and snippets.

@takeit
Created January 16, 2018 09:42
Show Gist options
  • Save takeit/05539fba179ea9fd97c029ad761708e0 to your computer and use it in GitHub Desktop.
Save takeit/05539fba179ea9fd97c029ad761708e0 to your computer and use it in GitHub Desktop.
# features/books.feature
Feature: Books feature
Scenario: Adding a new book
When I add "Content-Type" header equal to "application/json"
And I add "Accept" header equal to "application/json"
And I send a "POST" request to "/api/books/" with body:
"""
{
"title": "King",
"author": "T. M. Frazier",
"enabled": true
}
"""
Then the response status code should be 201
And the response should be in JSON
And the header "Content-Type" should be equal to "application/json"
And the JSON nodes should contain:
| title | King |
| author | T. M. Frazier |
And the JSON node "enabled" should be true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment