bounswe / 2021SpringGroup2

Repository of Group 2 for Fundamentals of Software Engineering course at Boğaziçi University
5 stars 2 forks source link

[Frontend] Badge Functionality Unit Tests #369

Closed berkaydoner closed 2 years ago

berkaydoner commented 2 years ago

I have implemented the badge functionality with various pages. All the badge information is kept in the backend; therefore, I think it would be a good idea to check the controller methods for this functionality using mock response. I am planning to check if the responses got from the backend are formatted correctly before used and if the requests sent to the backend are in correct format with method type and body.

berkaydoner commented 2 years ago

I have added several unit tests for the badge functionality. As I planned, I checked if the mock responses are formatted correctly to be used in Badge, BadgeList and other components. I checked if individual badge information, badge list information and related events information in the profile are formatted correctly. I also checked if the request done when sending a badge is in the correct format with correct body and POST method type.

berkaydoner commented 2 years ago

All unit tests pass on GitHub actions, pull request is #352.

berkaydoner commented 2 years ago

Pull request is merged and closed, closing the issue.