test: added unit test for ValidateAgeLimitUseCase
Description
Added unit test for ValidateAgeLimitUseCase
and handled error case during calling appdetails API of CleanApk.
Screenshots
Technical details
ValidateAgeLimitUseCase
calls appdetails API of CleanApk to fetch age rating data. The error case of this API call was not handled. Now, It will return ResultSumpreme.Error() if API call fails.
Tests
Issues
10 commandments of code reviews
Summary by CodeRabbit
-
New Features
- Improved app age limit validation by enhancing checks for NSFW content.
-
Tests
- Added comprehensive test cases for app age limit validation, covering scenarios like parental control settings, NSFW apps, clean apps, and age limits.
Edited by CodeRabbitAI