StreetCode icon indicating copy to clipboard operation
StreetCode copied to clipboard

[API] [Sources/GET] Inсorrect responce status for some of invalid Streetcode id

Open ruslana-feygina opened this issue 1 year ago • 0 comments

Environment: All Reproducible: Always Build found: https://github.com/ita-social-projects/StreetCode/commit/a7d807fdd928985083647a72ec61fa983110fea6

Preconditions:

  1. Open Postman.
  2. Choose the GET method.
  3. Enter valid endpoint '/api/Sources/GetCategoriesByStreetcodeId/{streetcodeid}'.
Actions Test Data Actual Result Expected Result Status
1 Send a request with an invalid {streetcodeid} from test data -2147483648, -1, 0, 1, 9999, 10000, 2147483647 Status 200 OK with response body [] Status 400 Bad Request with the message: "No street code with ID: {streetcodeid}" Fail
2 Send a request with an invalid {streetcodeid} from test data null, abc123, -2147483649, 2147483648 Status 404 Not Found Status 400 Bad Request with the message: "No street code with ID: {streetcodeid}" Fail

User story #833

ruslana-feygina avatar Apr 03 '24 20:04 ruslana-feygina