ita-social-projects / TeachUA

The project aims to promote the Ukrainian language for study clubs in Russian-speaking regions of Ukraine. This is a web application that contains a database of clubs with the Ukrainian language of instruction. Clubs have the opportunity to register on the site and provide information about themselves. Users can search for clubs by various parameters (activity type, location, etc.)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[API. Add club] The system responds to a request from an unauthorized user by processing the content of the request

TetianaFilatova opened this issue · comments

Environment: Windows 10 Pro
Postman for Windows Version 10.11.2
Reproducible: always

Preconditions
Run Postman
Don't authorize with token

TD1: {
"categoriesName":[
"Танці, хореографія"
],
"name": "name",
"ageFrom":2,
"ageTo":14,
"description":"{"blocks":[{"key":"brl63","text":"descriptiondescriptiondescriptiondescridescriptiondescriptiondescriptiondescri","type":"unstyled","depth":0,"inlineStyleRanges":[],"entityRanges":[],"data":{}}],"entityMap":{}}",
"userId":"1",
"contacts":"{"1"::"234567891"}",
"centerId":640
}

Steps to reproduce

  1. Create new POST request
  2. Choose Body>raw>JSON
  3. Enter TD1 to "Body"
  4. Click "Send" button

Actual result
Server responding with status code 400 Bad request and error message "name Довжина назви має бути від 5 до 100 символів"

Expected result
Server responding with status code 401 Unauthorized and error message "You are not authenticated"

User story and test case links

Labels to be added
"Bug", Priority ("pri: "), Severity ("severity:"), Type ("UI, "Functional"), "API" (for back-end bugs).

wrong_status_code.mp4
commented

@TetianaFilatova This is not a bug! I asked questions at the meeting and Yaroslav told me how it works.