Added features for data/handler/error_invalidresource, data/handler/error_notfound and data/handler/success

This commit is contained in:
Héctor Hurtado
2019-08-27 09:44:37 +02:00
parent 227ad8e4b7
commit 6bb8f974fb
3 changed files with 65 additions and 0 deletions
@@ -0,0 +1,16 @@
Feature: Fail to retrieve an invalid resource for a handler in Kapow! server.
If trying to access an invalid resource for a handler
then the server responds with an error.
@wip
Scenario: Try to get invented/path from a existent handler.
A request for retrieving an invalid resource for an
existent handler will trigger a invalid resource error.
Given I have a Kapow! server with the following routes:
| method | url_pattern | entrypoint | command |
| GET | /listRootDir | /bin/sh -c | ls -la / \| response /body |
When I send a request to the route "/listRootDir"
And I the get the resource "request/path" for the current request handler
Then I get 400 as response code
And I get "Invalid Resource Path" as response reason phrase