Refactoring Auth Tests

This commit is contained in:
2020-03-16 13:35:12 +01:00
parent 0221d7023a
commit 68238494e5
2 changed files with 27 additions and 1 deletions

24
.idea/runConfigurations/Auth_Tests.xml generated Normal file
View File

@@ -0,0 +1,24 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Auth Tests" type="JUnit" factoryName="JUnit" show_console_on_std_err="true">
<output_file path="$PROJECT_DIR$/var/log/test/out.log" is_save="true" />
<module name="dcproject.test" />
<useClassPathOnly />
<option name="PACKAGE_NAME" value="" />
<option name="MAIN_CLASS_NAME" value="RunCucumberTest" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="class" />
<option name="VM_PARAMETERS" value="-ea -Dcucumber.filter.tags=&quot;@auth&quot;" />
<option name="PARAMETERS" value="" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="wholeProject" />
</option>
<envs>
<env name="SEND_GRID_KEY" value="$SEND_GRID_KEY$" />
</envs>
<dir value="$PROJECT_DIR$" />
<tag value="!online" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>

View File

@@ -1,3 +1,4 @@
@auth
Feature: Auth routes
Scenario: The route for create citizen must response a 200 and return object
@@ -34,10 +35,11 @@ Feature: Auth routes
Then the response status code should be 400
Scenario: 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": "username-1",
"name": "niels-bohr",
"password": "azerty"
}
"""