Clean Citizen entities
Change plainPassword to just password Add request Input for /login
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
@auth
|
||||
Feature: Auth routes
|
||||
|
||||
Scenario: The route for create citizen must response a 200 and return object
|
||||
Scenario: I can resiter
|
||||
When I send a POST request to "/register" with body:
|
||||
"""
|
||||
{
|
||||
@@ -9,7 +9,7 @@ Feature: Auth routes
|
||||
"birthday": "2001-01-01",
|
||||
"user":{
|
||||
"username": "george-junior",
|
||||
"plain_password": "azerty"
|
||||
"password": "azerty"
|
||||
},
|
||||
"email": "george-junior@gmail.com"
|
||||
}
|
||||
@@ -20,7 +20,7 @@ Feature: Auth routes
|
||||
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.
|
||||
"""
|
||||
|
||||
Scenario: The route for create citizen must response a 400 and return object
|
||||
Scenario: I cannot create user if no username was sent
|
||||
When I send a POST request to "/register" with body:
|
||||
"""
|
||||
{
|
||||
@@ -28,18 +28,19 @@ Feature: Auth routes
|
||||
"birthday": "2001-01-01",
|
||||
"user":{
|
||||
"username": "",
|
||||
"plain_password": ""
|
||||
"password": ""
|
||||
}
|
||||
}
|
||||
"""
|
||||
Then the response status code should be 400
|
||||
|
||||
Scenario: The route for create citizen must response a 200 and return object
|
||||
Scenario: I can login with username and password
|
||||
The route for create citizen must response a 200 and return object
|
||||
Given I have citizen Niels Bohr
|
||||
When I send a POST request to "/login" with body:
|
||||
"""
|
||||
{
|
||||
"name": "niels-bohr",
|
||||
"username": "niels-bohr",
|
||||
"password": "azerty"
|
||||
}
|
||||
"""
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
@citizen
|
||||
Feature: citizens routes
|
||||
|
||||
Scenario: The route for get citizens must response a 200
|
||||
Scenario: I can get Citizens informations
|
||||
Given I have citizen Jean Perrin with ID "5267a5c6-af42-4a02-aa2b-6b71d2e43973"
|
||||
And I am authenticated as Jean Perrin
|
||||
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
|
||||
Scenario: I can get specific Citizen informations
|
||||
Given I have citizen Linus Pauling with ID "47a05c0f-7329-46c3-a7d0-325db37e9114"
|
||||
Given I am authenticated as Linus Pauling
|
||||
When I send a GET request to "/citizens/47a05c0f-7329-46c3-a7d0-325db37e9114"
|
||||
@@ -15,7 +15,7 @@ Feature: citizens routes
|
||||
And the response should contain object:
|
||||
| id | 47a05c0f-7329-46c3-a7d0-325db37e9114 |
|
||||
|
||||
Scenario: Can get connected citizen
|
||||
Scenario: I can get my citizen informations when I was connected
|
||||
Given I have citizen Henri Becquerel with ID "47356809-c8ef-4649-8b99-1c5cb9886d38"
|
||||
And I am authenticated as Henri Becquerel
|
||||
When I send a GET request to "/citizens/current"
|
||||
@@ -24,7 +24,7 @@ Feature: citizens routes
|
||||
| id | 47356809-c8ef-4649-8b99-1c5cb9886d38 |
|
||||
|
||||
@online
|
||||
Scenario: Can be connect with Passwordless auth
|
||||
Scenario: I can be connect with Passwordless auth
|
||||
Given I have citizen
|
||||
| id | c606110c-ff0e-4d09-a79e-74632d7bf7bd |
|
||||
| email | fabrice.lecomte.be@gmail.com |
|
||||
|
||||
Reference in New Issue
Block a user