Add security for follow
This commit is contained in:
@@ -78,7 +78,9 @@ class KtorServerAuthSteps: En, KoinTest {
|
||||
id = UUID.fromString(id),
|
||||
name = Citizen.Name(firstName, lastName),
|
||||
birthday = DateTime.now(),
|
||||
user = user
|
||||
user = user,
|
||||
followAnonymous = false,
|
||||
voteAnonymous = false
|
||||
)
|
||||
|
||||
try {
|
||||
|
||||
@@ -7,8 +7,8 @@ Feature: follow Article and Constitution
|
||||
Then the response status code should be 201
|
||||
|
||||
Scenario: The route for get follows of articles must response a 200 and return objects
|
||||
Given I have citizen John Doe with id "64b7b379-2298-43ec-b428-ba134930cabd"
|
||||
When I send a GET request to "/citizens/64b7b379-2298-43ec-b428-ba134930cabd/follows/articles"
|
||||
Given I have citizen John Smith with id "e3c0b08c-11be-418e-95e0-8596b4402feb"
|
||||
When I send a GET request to "/citizens/e3c0b08c-11be-418e-95e0-8596b4402feb/follows/articles"
|
||||
Then the response status code should be 200
|
||||
And the response should contain object:
|
||||
| current_page | 1 |
|
||||
@@ -26,8 +26,8 @@ Feature: follow Article and Constitution
|
||||
Then the response status code should be 201
|
||||
|
||||
Scenario: The route for get follows of constitutions must response a 200 and return objects
|
||||
Given I have citizen John Doe with id "64b7b379-2298-43ec-b428-ba134930cabd"
|
||||
When I send a GET request to "/citizens/64b7b379-2298-43ec-b428-ba134930cabd/follows/constitutions"
|
||||
Given I have citizen John Smith with id "e3c0b08c-11be-418e-95e0-8596b4402feb"
|
||||
When I send a GET request to "/citizens/e3c0b08c-11be-418e-95e0-8596b4402feb/follows/constitutions"
|
||||
Then the response status code should be 200
|
||||
And the response should contain object:
|
||||
| current_page | 1 |
|
||||
|
||||
Reference in New Issue
Block a user