Refactors Articles and Voter
- Move files into components (article) - Split articles routes - Refactoring for remove ktor-voter (ArticleVoter) - Remove mutability - Move DataConversion to separate file (Converter.kt) - Add Schemas for Articles routes - Fix SQL Query for Workgroup roles - rename container_name in docker-compose
This commit is contained in:
@@ -17,7 +17,7 @@ Feature: citizens routes
|
||||
|
||||
Scenario: Can get connected citizen
|
||||
Given I have citizen Henri Becquerel with ID "47356809-c8ef-4649-8b99-1c5cb9886d38"
|
||||
Given I am authenticated as Henri Becquerel
|
||||
And I am authenticated as Henri Becquerel
|
||||
When I send a GET request to "/citizens/current"
|
||||
Then the response status code should be 200
|
||||
And the response should contain object:
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Feature: follow Article
|
||||
|
||||
# Article
|
||||
Scenario: The route for follow article must response a 201 and return
|
||||
Scenario: The route for follow article must response a 201
|
||||
Given I have citizen Louis Pasteur
|
||||
And I am authenticated as Louis Pasteur
|
||||
And I have article
|
||||
|
||||
@@ -44,7 +44,8 @@ Feature: Workgroup
|
||||
Given I have citizen Werner Heisenberg
|
||||
And I am authenticated as Werner Heisenberg
|
||||
And I have workgroup:
|
||||
| id | ab469134-bf14-4856-b093-ae1aa990f977 |
|
||||
| id | ab469134-bf14-4856-b093-ae1aa990f977 |
|
||||
| created_by | Werner Heisenberg |
|
||||
When I send a DELETE request to "/workgroups/ab469134-bf14-4856-b093-ae1aa990f977"
|
||||
Then the response status code should be 204
|
||||
And The workgroup "ab469134-bf14-4856-b093-ae1aa990f977" not exists
|
||||
@@ -66,8 +67,9 @@ Feature: Workgroup
|
||||
And I have citizen Alessandro Volta with ID "b5bac515-45d4-4aeb-9b6d-2627a0bbc419"
|
||||
And I am authenticated as Blaise Pascal
|
||||
And I have workgroup:
|
||||
| id | b0ea1922-3bc6-44e2-aa7c-40158998cfbb |
|
||||
| name | Les bonobos |
|
||||
| id | b0ea1922-3bc6-44e2-aa7c-40158998cfbb |
|
||||
| name | Les bonobos |
|
||||
| created_by | Blaise Pascal |
|
||||
When I send a POST request to "/workgroups/b0ea1922-3bc6-44e2-aa7c-40158998cfbb/members" with body:
|
||||
"""
|
||||
[
|
||||
@@ -84,13 +86,15 @@ Feature: Workgroup
|
||||
Then the response status code should be 201
|
||||
|
||||
Scenario: Can remove member to workgroup
|
||||
Given I have citizen Heinrich Hertz
|
||||
Given I have citizen Heinrich Hertz with
|
||||
| id | 94f92424-c257-4582-907c-98564a8c4ac9 |
|
||||
And I have citizen William Thomson with ID "87909ba3-2069-431c-9924-219fd8411cf2"
|
||||
And I have citizen Paul Dirac with ID "1baf48bb-02bc-4d8f-ac86-33335354f5e7"
|
||||
And I am authenticated as Heinrich Hertz
|
||||
And I have workgroup:
|
||||
| id | b6c975df-dd44-4e99-adc1-f605746b0e11 |
|
||||
| name | Les Tacos |
|
||||
| id | b6c975df-dd44-4e99-adc1-f605746b0e11 |
|
||||
| name | Les Tacos |
|
||||
| created_by | Heinrich Hertz |
|
||||
And I have members in workgroup "b6c975df-dd44-4e99-adc1-f605746b0e11":
|
||||
| 87909ba3-2069-431c-9924-219fd8411cf2 |
|
||||
| 1baf48bb-02bc-4d8f-ac86-33335354f5e7 |
|
||||
@@ -104,9 +108,10 @@ Feature: Workgroup
|
||||
]
|
||||
"""
|
||||
Then the response status code should be 200
|
||||
And the response should contain object:
|
||||
| $.[0]citizen.id | 1baf48bb-02bc-4d8f-ac86-33335354f5e7 |
|
||||
And the JSON should have 2 items
|
||||
And the response should contain object:
|
||||
| $.[0]citizen.id | 94f92424-c257-4582-907c-98564a8c4ac9 |
|
||||
| $.[1]citizen.id | 1baf48bb-02bc-4d8f-ac86-33335354f5e7 |
|
||||
|
||||
Scenario: Can update members on workgroup
|
||||
Given I have citizen Leon Foucault
|
||||
@@ -115,8 +120,9 @@ Feature: Workgroup
|
||||
And I have citizen Georg Ohm with ID "b49e20c1-8393-45d6-a6a0-3fa5c71cbdc1"
|
||||
And I am authenticated as Leon Foucault
|
||||
And I have workgroup:
|
||||
| id | 784fe6bc-7635-4ae2-b080-3a4743b998bf |
|
||||
| name | Les Tacos |
|
||||
| id | 784fe6bc-7635-4ae2-b080-3a4743b998bf |
|
||||
| name | Les Tacos |
|
||||
| created_by | Leon Foucault |
|
||||
And I have members in workgroup "784fe6bc-7635-4ae2-b080-3a4743b998bf":
|
||||
| be3b0926-8628-4426-804a-75188a6eb315 |
|
||||
| d9671eca-abaf-4b67-9230-3ece700c1ddb |
|
||||
@@ -134,7 +140,7 @@ Feature: Workgroup
|
||||
]
|
||||
"""
|
||||
Then the response status code should be 200
|
||||
And the JSON should have 2 items
|
||||
And the response should contain object:
|
||||
| $.[0]citizen.id | be3b0926-8628-4426-804a-75188a6eb315 |
|
||||
| $.[1]citizen.id | b49e20c1-8393-45d6-a6a0-3fa5c71cbdc1 |
|
||||
And the JSON should have 2 items
|
||||
Reference in New Issue
Block a user