fix: remove the unused user use cases, fix the specs that no longer match the code, include api/middleware and api/pkg/claims in mutation testing, log failures that password reset requests currently ignore, and reject user_id claims that don't fit a user id

This commit is contained in:
fsylvain committed 2026-09-25 05:58:37 +02:00
1 parent cbb403011a
commit 3282b0580c
22 files changed
+260 -314

No files matched your search

-14
View File
@@ -233,17 +233,3 @@ func TestCreateUser(t *testing.T) {
t.Errorf("Verification code was not generated")
}
}
func TestUpdateUserVerification(t *testing.T) {
repo := newMockUserRepo()
repo.users[1] = user.User{ID: 1, IsVerified: false}
uc := useCases.NewUpdateUserUseCase(repo, &stubHasher{})
res, err := uc.UpdateVerificationStatus(1, true)
if err != nil {
t.Fatalf("Update failed: %v", err)
}
if !res.IsVerified {
t.Errorf("User should be verified")
}
}