Files
calorie-counter/backend
Andris Enins 8a031b30b6 test: add high & medium priority tests — 48 tests total, 0 failures
Unit tests:
- JwtTokenProviderTest (7): round-trip, tampered sig, expired, wrong secret
- UserServiceTest (6): Mifflin-St Jeor BMR for lose/maintain/gain, manual override
- MealServiceTest (6): calorie calc, food-memory create/avg, IDOR ownership

Integration tests:
- ValidationIntegrationTest (12): 400s for invalid email, short password,
  barcode pattern, food query length, history range >90 days
- ProfileAndMealIntegrationTest (11): profile CRUD, meal get/delete lifecycle,
  history, cross-user IDOR (403 on GET and DELETE), data-leakage check

Fixes bundled:
- GlobalExceptionHandler: add ConstraintViolationException (400) and
  MissingServletRequestParameterException (400) handlers
- AiService: remove unused spring-ai import (compile fix)
2026-05-18 22:44:53 +03:00
..