Implementing 204 on delete and removing unnecessary steps
This commit is contained in:
+1
-1
@@ -360,7 +360,7 @@ def delete_route(app):
|
||||
else:
|
||||
app.change_routes(routes)
|
||||
app["user_routes"] = routes
|
||||
return web.Response(status=200, reason="OK")
|
||||
return web.Response(status=204, reason="No Content")
|
||||
return _delete_route
|
||||
|
||||
|
||||
|
||||
@@ -18,12 +18,8 @@ Feature: Routes auto-ordering after deleting in a Kapow! server.
|
||||
will be decreased by one.
|
||||
|
||||
When I delete the first route inserted
|
||||
Then I get 200 as response code
|
||||
And I get "OK" as response reason phrase
|
||||
When I request a routes listing
|
||||
Then I get 200 as response code
|
||||
And I get "OK" as response reason phrase
|
||||
And I get a list with the following elements:
|
||||
And I request a routes listing
|
||||
Then I get a list with the following elements:
|
||||
"""
|
||||
[
|
||||
{
|
||||
@@ -58,12 +54,8 @@ Feature: Routes auto-ordering after deleting in a Kapow! server.
|
||||
maintain their relative order and indexes.
|
||||
|
||||
When I delete the last route inserted
|
||||
Then I get 200 as response code
|
||||
And I get "OK" as response reason phrase
|
||||
When I request a routes listing
|
||||
Then I get 200 as response code
|
||||
And I get "OK" as response reason phrase
|
||||
And I get a list with the following elements:
|
||||
And I request a routes listing
|
||||
Then I get a list with the following elements:
|
||||
"""
|
||||
[
|
||||
{
|
||||
@@ -99,12 +91,8 @@ Feature: Routes auto-ordering after deleting in a Kapow! server.
|
||||
following routes will be decreased by one.
|
||||
|
||||
When I delete the second route inserted
|
||||
Then I get 200 as response code
|
||||
And I get "OK" as response reason phrase
|
||||
When I request a routes listing
|
||||
Then I get 200 as response code
|
||||
And I get "OK" as response reason phrase
|
||||
And I get a list with the following elements:
|
||||
And I request a routes listing
|
||||
Then I get a list with the following elements:
|
||||
"""
|
||||
[
|
||||
{
|
||||
|
||||
@@ -10,5 +10,5 @@ Feature: Delete routes in Kapow! server.
|
||||
| GET | /listRootDir | /bin/sh -c | ls -la / \| response /body |
|
||||
| GET | /listDir/{dirname} | /bin/sh -c | ls -la /request/params/dirname \| response /body |
|
||||
When I delete the first route
|
||||
Then I get 200 as response code
|
||||
And I get "OK" as response reason phrase
|
||||
Then I get 204 as response code
|
||||
And I get "No Content" as response reason phrase
|
||||
|
||||
Reference in New Issue
Block a user