ita-social-projects / GreenCity

The main aim of “GreenCity” project is to teach people in a playful and challenging way to have an eco-friendly lifestyle. A user can view on the map places that have some eco-initiatives or suggest discounts for being environmentally aware (for instance, coffee shops that give a discount if a customer comes with their own cup). А user can start doing an environment-friendly habit and track their progress with a habit tracker.
MIT License
65 stars 80 forks source link

[API] Admin can create employee with empty required fields #5472

Closed Yegor-Klimenko closed 1 year ago

Yegor-Klimenko commented 1 year ago

Environment: Postman Reproducible: always. Build found: last commit from https://github.com/ita-social-projects/GreenCityClient/tree/dev E.g. "commit 147fa44"

Preconditions Postman is installed.

Steps to reproduce

  1. Open Postman.
  2. Choose method POST.
  3. Set up endpoint: https://greencity-ubs.testgreencity.ga/admin/ubs-employee/save-employee
  4. Set up parameter (firstName/lastName/phoneNumber/email/id/employeePositions/tariffs)
  5. Set up parameter Authorizetion.
  6. Leave the "LastName" field empty.
  7. Send request.

Actual result Admin could create emloyee with empty required (*) fields. Status 201

Expected result Recording to the requirements Admin can't create Employee without all required (*) fields. Response 400 Bad Request.

User story and test case links Edit employee permissions #4617 Test case"

Labels to be added "Bug", "severity:high ", "Functional", "API"

BUG API

Phobos13bdrive commented 1 year ago

500 Internal Server Error image

ospodaryk commented 1 year ago

The response is correct. If the data is empty, the result provided is accurate.

image