Source

rest-api-blueprint / restapiblueprint / features / delete_person.feature

Feature: Delete a person
  As an API client
  I want to be able to remove a person

  Background: Reset and have a valid user
    Given I am using server "http://localhost:5000/v1"
    And I set Accept header to "application/json"
    When I send a DELETE request to "people"
    Then the response status should be "200"

  Scenario: Cannot delete a person before they exist
    When I send a DELETE request to "people/fred"
    Then the response status should be "404"
    And the JSON at path "status" should be "error"
    And the JSON at path "message" should be "Person does not exist"

  Scenario: Delete a person
    When I send a PUT request to "people/fred"
    And I send a DELETE request to "people/fred"
    And I send a GET request to "people/fred"
    Then the response status should be "404"
    And the JSON at path "status" should be "error"
    And the JSON at path "message" should be "Person does not exist"
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.