We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug When sending a POST review request with text =whitespaces, the system allows it to save.
Precondition: User is registered, the Bearer token is obtained, and the user has not posted a review on a product.
To Reproduce Send the POST request as below, and use a valid Bearer token.
curl --location 'https://iced-latte.uk/backend/api/v1/products/ba5f15c4-1f72-4b97-b9cf-4437e5c6c2fa/reviews' --header 'Content-Type: application/json' --header 'Authorization: {token}' --data '{ "text": " ", "rating": "5"
}' Expected behavior The system should reject request with 400 HTTP Status code and return the appropriate error message = "Invalid data".
Actual result System accept the request, HTTP Status code = 200 and review posted with text = " "
The text was updated successfully, but these errors were encountered:
Issue Sunagatov#310 - handled wide space with EmptyProductReviewExcep…
d87b3b3
…tion
@TetianaPerinha / @Sunagatov I have fixed the bug please validate and approve.
Sorry, something went wrong.
Merge pull request #311 from RaffhanKhan/RaffhanKhan-310-fix
e9e4b09
Issue #310 - handled wide space with EmptyProductReviewException
Successfully merging a pull request may close this issue.
Describe the bug
When sending a POST review request with text =whitespaces, the system allows it to save.
Precondition:
User is registered, the Bearer token is obtained, and the user has not posted a review on a product.
To Reproduce
Send the POST request as below, and use a valid Bearer token.
curl --location 'https://iced-latte.uk/backend/api/v1/products/ba5f15c4-1f72-4b97-b9cf-4437e5c6c2fa/reviews'
--header 'Content-Type: application/json'
--header 'Authorization: {token}'
--data '{
"text": " ",
"rating": "5"
}'
Expected behavior
The system should reject request with 400 HTTP Status code and return the appropriate error message = "Invalid data".
Actual result
System accept the request, HTTP Status code = 200 and review posted with text = " "
The text was updated successfully, but these errors were encountered: