viraxslot / online-school-app

Backend for testing purposes.
0 stars 0 forks source link

No error when trying to remove reaction which hasn't been given yet #52

Open yanaaleeva opened 2 years ago

yanaaleeva commented 2 years ago

Pre-conditions

There exists student role user with valid credentials, user is logged in and Bearer Token "Student Token" is generated There exists Course Category and course with CourseId="1" User has not previously put reaction (like or dislike) to the course

Steps to reproduce

In Postman collection click "Add request" Name request, e.g. "Repeated reaction" in Auth Tab choose Bearer Token from droplist, and type in "StudentToken" into text field Send POST request to http://qa-school-test.quantori.academy/api/v1/courses/1/like/remove

Actual behavior

Response code 200 Json body :{ "result": "You've removed your like/dislike from the course" }

Expected behavior

Response code 400 Error message: "You've not previously left a reaction for this course"

image