(t *testing.T)
| 177 | } |
| 178 | |
| 179 | func TestHandleTaskByID_NotFound(t *testing.T) { |
| 180 | dir := createTestTaskDir(t) |
| 181 | dp := NewDataProvider(dir, false) |
| 182 | |
| 183 | req := httptest.NewRequest(http.MethodGet, "/api/tasks/999", nil) |
| 184 | req.SetPathValue("id", "999") |
| 185 | rec := httptest.NewRecorder() |
| 186 | |
| 187 | handleTaskByID(dp)(rec, req) |
| 188 | |
| 189 | if rec.Code != http.StatusNotFound { |
| 190 | t.Fatalf("expected 404, got %d", rec.Code) |
| 191 | } |
| 192 | } |
| 193 | |
| 194 | func TestHandleBoard(t *testing.T) { |
| 195 | dir := createTestTaskDir(t) |
nothing calls this directly
no test coverage detected