bee1305a2bebb31b7b5e49b525f462d3a19088ec
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>
Description
Simple Forumengine
4.2 MiB
Languages
Go
67.9%
TypeScript
19.2%
HTML
7%
CSS
4.3%
Shell
1.1%
Other
0.5%