feature #9: Create route for register
This commit is contained in:
33
src/test/resources/feature/auth.feature
Normal file
33
src/test/resources/feature/auth.feature
Normal file
@@ -0,0 +1,33 @@
|
||||
Feature: Auth routes
|
||||
|
||||
Scenario: The route for create citizen must response a 200 and return object
|
||||
When I send a POST request to "/register" with body:
|
||||
"""
|
||||
{
|
||||
"name": {"first_name":"George", "last_name":"MICHEL"},
|
||||
"birthday": "2001-01-01",
|
||||
"user":{
|
||||
"username": "george-junior",
|
||||
"plain_password": "azerty"
|
||||
}
|
||||
}
|
||||
"""
|
||||
Then the response status code should be 200
|
||||
And the Response should contain:
|
||||
"""
|
||||
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.
|
||||
"""
|
||||
|
||||
Scenario: The route for create citizen must response a 200 and return object
|
||||
When I send a POST request to "/login" with body:
|
||||
"""
|
||||
{
|
||||
"name": "username1",
|
||||
"password": "azerty"
|
||||
}
|
||||
"""
|
||||
Then the response status code should be 200
|
||||
And the Response should contain:
|
||||
"""
|
||||
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.
|
||||
"""
|
||||
Reference in New Issue
Block a user