remove fixed raw citizen and use real current citizen
Fix tests
This commit is contained in:
@@ -18,7 +18,7 @@ Feature: Auth routes
|
||||
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.
|
||||
"""
|
||||
|
||||
Scenario: The route for create citizen must response a 200 and return object
|
||||
Scenario: The route for create citizen must response a 400 and return object
|
||||
When I send a POST request to "/register" with body:
|
||||
"""
|
||||
{
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
Feature: citizens routes
|
||||
|
||||
Scenario: The route for get citizens must response a 200
|
||||
Given I am authenticated as John Doe with id "64b7b379-2298-43ec-b428-ba134930cabd"
|
||||
When I send a GET request to "/citizens"
|
||||
Then the response status code should be 200
|
||||
|
||||
Scenario: The route for get one citizen must response a 200 and return citizen
|
||||
Given I am authenticated as John Doe with id "64b7b379-2298-43ec-b428-ba134930cabd"
|
||||
When I send a GET request to "/citizens/6434f4f9-f570-f22a-c134-8668350651ff"
|
||||
Then the response status code should be 200
|
||||
And the response should contain object:
|
||||
|
||||
@@ -11,7 +11,7 @@ Feature: constitution routes
|
||||
| id | 0ca489a6-ef68-8bd5-2355-5793d4b3d66c |
|
||||
|
||||
Scenario: The route for create constitution must response a 200 and return object
|
||||
Given I have citizen John Doe with id "64b7b379-2298-43ec-b428-ba134930cabd"
|
||||
Given I am authenticated as John Doe with id "64b7b379-2298-43ec-b428-ba134930cabd"
|
||||
When I send a POST request to "/constitutions" with body:
|
||||
"""
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@ Feature: follow Article and Constitution
|
||||
|
||||
# Article
|
||||
Scenario: The route for follow article must response a 201 and return object
|
||||
Given I have citizen John Doe with id "64b7b379-2298-43ec-b428-ba134930cabd"
|
||||
Given I am authenticated as John Doe with id "64b7b379-2298-43ec-b428-ba134930cabd"
|
||||
When I send a POST request to "/articles/9226c1a3-8091-c3fa-7d0d-c2e98c9bee7b/follow"
|
||||
Then the response status code should be 201
|
||||
|
||||
@@ -15,13 +15,13 @@ Feature: follow Article and Constitution
|
||||
| limit | 50 |
|
||||
|
||||
Scenario: The route for unfollow article must response a 204
|
||||
Given I have citizen John Doe with id "64b7b379-2298-43ec-b428-ba134930cabd"
|
||||
Given I am authenticated as John Doe with id "64b7b379-2298-43ec-b428-ba134930cabd"
|
||||
When I send a DELETE request to "/articles/9226c1a3-8091-c3fa-7d0d-c2e98c9bee7b/follow"
|
||||
Then the response status code should be 204
|
||||
|
||||
# Constitution
|
||||
Scenario: The route for follow constitution must response a 201 and return object
|
||||
Given I have citizen John Doe with id "64b7b379-2298-43ec-b428-ba134930cabd"
|
||||
Given I am authenticated as John Doe with id "64b7b379-2298-43ec-b428-ba134930cabd"
|
||||
When I send a POST request to "/constitutions/72aa1ee1-4963-eb44-c9e0-5ce6e0f18f00/follow"
|
||||
Then the response status code should be 201
|
||||
|
||||
@@ -34,6 +34,6 @@ Feature: follow Article and Constitution
|
||||
| limit | 50 |
|
||||
|
||||
Scenario: The route for unfollow constitution must response a 204
|
||||
Given I have citizen John Doe with id "64b7b379-2298-43ec-b428-ba134930cabd"
|
||||
Given I am authenticated as John Doe with id "64b7b379-2298-43ec-b428-ba134930cabd"
|
||||
When I send a DELETE request to "/constitutions/72aa1ee1-4963-eb44-c9e0-5ce6e0f18f00/follow"
|
||||
Then the response status code should be 204
|
||||
|
||||
Reference in New Issue
Block a user