chore: serve static files from dir on dev

This commit is contained in:
juancwu 2026-04-11 14:34:50 +00:00
commit f25244b016
2 changed files with 11 additions and 2 deletions

View file

@ -220,6 +220,9 @@ func TestSetupRoutes_NotFound(t *testing.T) {
func TestSetupRoutes_StaticAssets(t *testing.T) {
testutil.ForEachDB(t, func(t *testing.T, dbi testutil.DBInfo) {
a := newTestApp(dbi)
// Force the embedded-FS branch so the test is independent of CWD;
// in dev we serve from ./assets on disk (see SetupRoutes).
a.Cfg.AppEnv = "production"
handler := SetupRoutes(a)
req := httptest.NewRequest(http.MethodGet, "/assets/css/output.css", nil)