When adding a new person you can set the birthdate of this person to be in the future.
Steps to recreate:
1: Send a post request to /api/person with in the JSON body the birthdate a date in the future eg. "dateOfBirth": "2030-09-17"
2: The other fields in the body are filled in as expected so nut null
3: execute api call.
wrong outcome: a person is added in the database with a birthdate that is in the future.
Expected behaviour:
The request should return an error status code 400 with a message stating that a user cannot be born in the future. The person should not appear in the database.
When adding a new person you can set the birthdate of this person to be in the future.
Steps to recreate: 1: Send a post request to /api/person with in the JSON body the birthdate a date in the future eg. "dateOfBirth": "2030-09-17" 2: The other fields in the body are filled in as expected so nut null 3: execute api call.
wrong outcome: a person is added in the database with a birthdate that is in the future.
Expected behaviour: The request should return an error status code 400 with a message stating that a user cannot be born in the future. The person should not appear in the database.