(t *testing.T)
| 169 | } |
| 170 | |
| 171 | func TestMountFallback_NonRootPath(t *testing.T) { |
| 172 | dir := createTestTaskDir(t) |
| 173 | s := NewServer(Config{ScanDir: dir}) |
| 174 | |
| 175 | mux := http.NewServeMux() |
| 176 | s.mountFallback(mux) |
| 177 | |
| 178 | req := httptest.NewRequest(http.MethodGet, "/board", nil) |
| 179 | rec := httptest.NewRecorder() |
| 180 | |
| 181 | mux.ServeHTTP(rec, req) |
| 182 | |
| 183 | if rec.Code != http.StatusOK { |
| 184 | t.Fatalf("expected 200 for non-root path, got %d", rec.Code) |
| 185 | } |
| 186 | |
| 187 | body := rec.Body.String() |
| 188 | if !strings.Contains(body, "taskmd") { |
| 189 | t.Error("expected fallback HTML for non-root path") |
| 190 | } |
| 191 | } |
| 192 | |
| 193 | func TestMountFallback_APIReturns404(t *testing.T) { |
| 194 | dir := createTestTaskDir(t) |
nothing calls this directly
no test coverage detected