ita-social-projects / Home

Home - is an all-in-one social service that will cover all aspects of your communication with your home and neighbors.
http://www.home-project-engineering.tech/api/0/apidocs/index.html
MIT License
26 stars 30 forks source link

Getting 201 Created status code #483

Open AndrChristina opened 2 years ago

AndrChristina commented 2 years ago

Environment: Windows 7, Google Chrome v.103.0.5060.134, Postman for Web v. 9.28.1-220808-1444. Reproducible: always.

Preconditions Choose the user as a member of cooperation A (e.g. Затишок) and try to invite new users to cooperation B (e.g. Крила ночііі).

Steps to reproduce

  1. Go to Postman.
  2. Insert the URL (https://home-project-academy.herokuapp.com/api/0/invitations/create-invitation).
  3. Choose POST method.
  4. Insert to the Authorization proper Bearer Token.
  5. Write json to the Body:
    {
    "type": "cooperation",
    "email": "fgfdsgfdra@protonmail.com",
    "cooperation_id": 1,
    "role": "user"
    }
  6. Click on the button Send

Actual result Getting 201 Created status code 7fb8f83a-118c-455c-b9db-c8cc8c39cc04

Expected result Should be 403 Forbidden error (You do not have permission to perform this action.)

User story and test case links "Task #477"

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