StreetCode
StreetCode copied to clipboard
[API][Related figure] The responses for GET/POST/DELETE requests do not correct
trafficstars
Environment: all Reproducible: always Build found: c648525
Preconditions
- Open Postman.
- Choose the GET/POST/DELETE method.
- Enter valid endpoints.
| Request | Data | Actual result | Expected result | Status |
|---|---|---|---|---|
| GetBy StreetcodeId, GetByTagId |
An invalid characters, for instance, 1@ | 404 Not Found | 400 Bad request "ID can only contain numbers." | Fail |
| Create | One of Streetcode ID does not exist, 900&438 | 400 Bad Request "Немає існуючого стріткоду з ідентифікатором: 900." | 404 Not Found "No existing Streetcode with ID: 900." | Fail |
| Create | Both Streetcode IDs do not exist, 900&50 | 400 Bad Request "Немає існуючого стріткоду з ідентифікатором: 900." | 404 Not Found "No existing Streetcodes with IDs: 900, 50." | Fail |
| Create | Invalid data, 439&a13 | 404 Not Found | 400 Bad request "URL can only contain {ObserverId}&{TargetId}, where IDs are numbers of existing streetcodes." | Fail |
| Create | Invalid data, 439&-13 | 400 Bad Request "Немає існуючого стріткоду з ідентифікатором: -13." | 400 Bad request "URL can only contain {ObserverId}& {TargetId}, where IDs are numbers of existing streetcodes." | Fail |
| Delete | 1. Make request, 1045&1043 2. Second time make the same request, 1043&1045 |
400 Bad Request, "Не вдалося знайти відношення між стріткодами з відповідними ідентифікаторами: 1043&1045." | 400 Bad Request "Could not find connection between streetcodes with corresponding identifiers: 1043&1045." | Fail |
| Delete | Streetcode IDs exist but weren't resolved 1045&438 | 400 Bad Request "Не вдалося знайти відношення між стріткодами з відповідними ідентифікаторами: 1043&438." | 400 Bad Request "Could not find connection between streetcodes with corresponding identifiers: 1043&438." | Fail |
| Delete | 1. Streetcode ID 900 does not exist, 900&438 2. Both Streetcode IDs do not exist |
1. 400 Bad Request "Не вдалося знайти відношення між стріткодами з відповідними ідентифікаторами: 900&438." 2. 400 Bad Request "Не вдалося знайти відношення між стріткодами з відповідними ідентифікаторами: 900&50." |
1. 404 Not Found "No existing Streetcode with ID: 900." 2. 404 Not Found "No existing Streetcodes with IDs: 900, 50." |
Fail |
| Delete | Invalid data, Streetcode IDs exist and resolved, 1045-1043 | 404 Not Found | 400 Bad request "URL can only contain {ObserverId}&{TargetId}, where IDs are numbers of existing and connected streetcodes." | Fail |
| Delete | Invalid data, 1045&-13 | 400 Bad Request "Не вдалося знайти відношення між стріткодами з відповідними ідентифікаторами: 439&-13." | 400 Bad request "URL can only contain {ObserverId}& {TargetId}, where IDs are numbers of existing and connected streetcodes." | Fail |
User story: #40 Related bugs: #1382