Add tests for RequestPasswordResetHandler and fix test compilation errors

- Add comprehensive tests for RequestPasswordResetHandler covering success and error cases
- Fix timezone-related test failures after removal of User.Timezone field:
  - Remove Timezone assertions from login_user_test.go
  - Remove Timezone field from RegisterRequest in integration tests
  - Update ValidateRegistration test cases (no longer validates timezone)
  - Update migrations_test to check current user table schema
- Fix syntax errors in user_repository_test.go (duplicate closing braces on lines 114 and 210)
This commit is contained in:
2025-12-01 23:04:40 +01:00
parent 5d92820591
commit f780c69806
7 changed files with 338 additions and 37 deletions
@@ -90,10 +90,6 @@ func TestLoginUserHandler_Success(t *testing.T) {
if result.Email != "test@example.com" {
t.Errorf("Email = %v, want %v", result.Email, "test@example.com")
}
if result.Timezone != "UTC" {
t.Errorf("Timezone = %v, want %v", result.Timezone, "UTC")
}
}
func TestLoginUserHandler_EmptyEmail(t *testing.T) {