xtablo-source/backend/internal/web
Arthur Belleville b5c3fc4d48
test(02-06): add failing tests for logout, protected routes, and layout auth
- TestLogout_Success: POST /logout with valid cookie -> 303, cookie cleared, session deleted
- TestLogout_UnauthRedirectsToLogin: POST /logout without cookie -> 303 from RequireAuth
- TestLogout_HXRedirect: HTMX logout -> 200 + HX-Redirect: /login
- TestLogout_AfterLogoutSubsequentRequestUnauth: stale cookie blocked after logout
- TestProtected_HomeUnauthRedirects: GET / without session -> 303 /login
- TestProtected_HomeUnauthHXRedirect: HTMX GET / without session -> 200 + HX-Redirect
- TestProtected_HomeAuthRendersUserEmail: authed GET / -> 200 with user email
- TestLayout_LogoutFormVisibleWhenAuthed: Layout with user shows logout form
- TestLayout_LogoutFormHiddenWhenUnauthed: Layout with nil user hides logout form
2026-05-14 22:32:33 +02:00
..
ui test(01-02): add ui package smoke tests 2026-05-14 18:47:31 +02:00
handlers.go feat(01-03): templ layout/index/fragments + handlers + chi router 2026-05-14 19:25:43 +02:00
handlers_auth.go feat(02-05): login vertical slice with rate limiting 2026-05-14 22:27:54 +02:00
handlers_auth_test.go test(02-06): add failing tests for logout, protected routes, and layout auth 2026-05-14 22:32:33 +02:00
handlers_test.go feat(02-04): signup handler, router wiring, and integration tests 2026-05-14 22:17:50 +02:00
middleware.go feat(01-03): pgxpool wrapper, RequestID/slog middleware, slog handler switch 2026-05-14 19:24:16 +02:00
router.go feat(02-05): login vertical slice with rate limiting 2026-05-14 22:27:54 +02:00
slog.go feat(01-03): pgxpool wrapper, RequestID/slog middleware, slog handler switch 2026-05-14 19:24:16 +02:00
testdb_test.go feat(02-04): signup handler, router wiring, and integration tests 2026-05-14 22:17:50 +02:00