Change response code from phrase to code and 'phrase' by 'reason phrase'

This commit is contained in:
Roberto Abdelkader Martínez Pérez
2019-08-20 09:54:18 +02:00
parent 5352322ad5
commit 5e253c9814
7 changed files with 73 additions and 24 deletions
@@ -11,8 +11,8 @@ Feature: Kapow! server reject insert responses with semantic errors.
When I insert the route:
| entrypoint | command |
| /bin/sh -c | ls -la / \| response /body |
Then I get unprocessable entity as response code
And I get "Missing Mandatory Field" as response phrase
Then I get 422 as response code
And I get "Missing Mandatory Field" as response reason phrase
And I get the following entity as response body:
| missing_mandatory_fields |
| "url_pattern", "method" |
@@ -25,8 +25,8 @@ Feature: Kapow! server reject insert responses with semantic errors.
When I insert the route:
| method | url_pattern | entrypoint | command | index |
| GET | /listRootDir | /bin/sh -c | ls -la / \| response /body | 0 |
Then I get unprocessable entity as response code
And I get "Invalid Route Spec" as response phrase
Then I get 422 as response code
And I get "Invalid Route Spec" as response reason phrase
And I get an empty response body
Scenario: Error because of wrong method value.
@@ -37,6 +37,6 @@ Feature: Kapow! server reject insert responses with semantic errors.
When I insert the route:
| method | url_pattern | entrypoint | command | index |
| AVECES | /listRootDir | /bin/sh -c | ls -la / \| response /body | 0 |
Then I get unprocessable entity as response code
And I get "Invalid Data Type" as response phrase
Then I get 422 as response code
And I get "Invalid Data Type" as response reason phrase
And I get an empty response body