MCPcopy Create free account
hub / github.com/driangle/taskmd / TestHandleTaskByID_NotFound

Function TestHandleTaskByID_NotFound

apps/cli/internal/web/handlers_test.go:179–192  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

177}
178
179func 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
194func TestHandleBoard(t *testing.T) {
195 dir := createTestTaskDir(t)

Callers

nothing calls this directly

Calls 3

createTestTaskDirFunction · 0.85
NewDataProviderFunction · 0.85
handleTaskByIDFunction · 0.85

Tested by

no test coverage detected