viraxslot / online-school-app

Backend for testing purposes.
0 stars 0 forks source link

No error message when user repeats like/dislike #51

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 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 In Body tab choose "raw" and "json" from droplists respectively. Send POST request to http://qa-school-test.quantori.academy/api/v1/courses/1/like/yes (http://qa-school-test.quantori.academy/api/v1/courses/1/like/no respectively)

Actual behavior Response code 200 Json body :{ "result": "You've liked the course" }

Expected behavior Response code 400 Error message: "You have previously liked/disliked the course"

Screenshots image

yanaaleeva commented 2 years ago

Hello @viraxslot I'd suggest #51 and #52 are up to BA what he/she requires as this is a minor bug, which still allows user to keep/remove reaction and doesn't affect the count.