irrlicht bee1305a2b Add endpoint tests with httptest
Two small refactors make the handlers testable:
- extract route registration into routes() http.Handler (was inline in main)
- initDB(dsn) takes a DSN so tests use an isolated temp-file DB

loginJitter var lets tests disable the anti-timing sleep for speed.

endpoints_test.go covers the main flows via httptest + cookie jar:
register/login/headerbar, empty-then-populated feed, create requires auth,
voting (new/toggle/switch, per-user tallies), vote auth + invalid mode,
and account deletion (wrong/correct password, login fails after).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-01 11:16:02 +02:00
2025-12-22 23:33:39 +01:00
2025-12-13 12:21:44 +01:00
2026-06-01 11:16:02 +02:00
2026-06-01 11:16:02 +02:00
2026-06-01 11:16:02 +02:00
2026-06-01 10:19:29 +02:00
S
Description
Simple Forumengine
3.5 MiB
Languages
Go 53.2%
HTML 17.8%
JavaScript 16.9%
CSS 6.8%
Shell 4.6%
Other 0.7%