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

Function TestHandleWorklog_TaskNotFound

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

Source from the content-addressed store, hash-verified

1188}
1189
1190func TestHandleWorklog_TaskNotFound(t *testing.T) {
1191 dir := createTestTaskDir(t)
1192 dp := NewDataProvider(dir, false)
1193
1194 req := httptest.NewRequest(http.MethodGet, "/api/tasks/999/worklog", nil)
1195 req.SetPathValue("id", "999")
1196 rec := httptest.NewRecorder()
1197
1198 handleWorklog(dp)(rec, req)
1199
1200 if rec.Code != http.StatusNotFound {
1201 t.Fatalf("expected 404, got %d", rec.Code)
1202 }
1203}
1204
1205func TestHandleWorklog_EmptyID(t *testing.T) {
1206 dir := createTestTaskDir(t)

Callers

nothing calls this directly

Calls 3

createTestTaskDirFunction · 0.85
NewDataProviderFunction · 0.85
handleWorklogFunction · 0.85

Tested by

no test coverage detected