Created
January 16, 2018 09:42
-
-
Save takeit/05539fba179ea9fd97c029ad761708e0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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