Skip to content

Add HTTP-level tests and fix 401 on failed login - #10

Merged
cloudxdam merged 5 commits into
developfrom
feat/controller-tests
Oct 8, 2026
Merged

cloudxdam merged 5 commits into
developfrom
feat/controller-tests

Conversation

@cloudxdam

@cloudxdam cloudxdam commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Add AuthControllerTest, ReservationControllerTest and RestaurantTableControllerTest: 13 new tests covering the HTTP layer with MockMvc and real JWTs (24 tests in total).
  • Return 401 with the same body for both unknown user and wrong password, instead of 404/409, so login no longer reveals which usernames exist.
  • Configure the security entry point so unauthenticated requests get 401 instead of Spring Security's default 403.
  • Update the README testing section.
  • Fix the CI JWT_SECRET so it is valid Base64, which JwtService decodes on every token generation.

@cloudxdam
cloudxdam merged commit 4c67759 into develop Oct 8, 2026
1 check passed
@cloudxdam
cloudxdam deleted the feat/controller-tests branch October 8, 2026 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant