Refactor tests to enhance response validation and error handling

- Updated gacha claims service tests to parse and verify error JSON content for various scenarios.
- Improved gacha credits controller tests by adding checks for success messages in JSON responses.
- Enhanced gacha items service tests to validate response data structure and content.
- Modified IAM auth controller and service tests to ensure token data integrity and presence of required fields.
- Refined permissions controller and service tests to assert response data correctness.
- Improved roles controller and service tests to validate response data and ensure non-empty fields.
- Enhanced teams controller tests to verify sensitive data exposure and required fields in responses.
- Updated users controller and service tests to ensure response data integrity and presence of required fields.
This commit is contained in:
MythEclipse
2025-10-05 17:05:06 +07:00
parent 9cecc8fa05
commit 49abcf28c3
19 changed files with 351 additions and 122 deletions
+1 -1
View File
@@ -247,7 +247,7 @@ impl UsersSchema {
password,
phone_number: user.phone_number,
phone_for_verification: None,
is_active: false,
is_active: user.is_active,
mentor_id: None, // Regular users should not have a mentor_id by default
gender: None,
birthdate: None,