Add comprehensive tests for Gacha Credits, Auth, and User services
- Implement tests for GachaCreditsService including creation, retrieval, updating, and deletion of gacha credits. - Add tests for AuthController covering user login, registration, email verification, and error handling for invalid credentials. - Enhance AuthService tests to include login, registration, email verification, OTP resend, password reset, and token refresh functionalities. - Create tests for UsersService to validate user creation, retrieval, updating, deletion, and fetching by email. - Ensure all tests utilize a consistent setup and teardown process for database interactions.
This commit is contained in:
@@ -99,3 +99,15 @@ pub async fn setup() {
|
||||
.unwrap();
|
||||
seed_users_for_test(&app_state.surrealdb_ws).await.unwrap();
|
||||
}
|
||||
|
||||
pub fn get_meta_request_dto(page: u64, per_page: u64) -> imphnen_entities::MetaRequestDto {
|
||||
imphnen_entities::MetaRequestDto {
|
||||
page: Some(page),
|
||||
per_page: Some(per_page),
|
||||
search: None,
|
||||
sort_by: None,
|
||||
order: None,
|
||||
filter: None,
|
||||
filter_by: None,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user