Refactor tests to improve response parsing and validation

- Introduced a new common module with response helper functions to streamline response parsing across tests.
- Updated role controller tests to assert success messages in responses for create, update, and delete operations.
- Enhanced role service tests to validate response structures and ensure proper error handling.
- Modified team controller and service tests to check for success messages and validate response data formats.
- Improved user controller and service tests to include success message assertions and error handling for invalid inputs.
- Ensured all tests utilize the new response parsing functions for consistency and maintainability.
This commit is contained in:
MythEclipse
2025-10-05 16:00:46 +07:00
parent a32f54873b
commit 9cecc8fa05
25 changed files with 893 additions and 512 deletions
+1
View File
@@ -59,6 +59,7 @@ pub fn create_test_user(
pub mod iam;
pub mod hackathon;
pub mod mock_test;
pub mod common;
pub use mock_test::{
cleanup_db, create_mock_app_state, seed_permissions_and_roles_for_test,