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

Function TestHandleTaskByID_EmptyID

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

Source from the content-addressed store, hash-verified

163}
164
165func TestHandleTaskByID_EmptyID(t *testing.T) {
166 dir := createTestTaskDir(t)
167 dp := NewDataProvider(dir, false)
168
169 req := httptest.NewRequest(http.MethodGet, "/api/tasks/", nil)
170 rec := httptest.NewRecorder()
171
172 handleTaskByID(dp)(rec, req)
173
174 if rec.Code != http.StatusBadRequest {
175 t.Fatalf("expected 400, got %d", rec.Code)
176 }
177}
178
179func TestHandleTaskByID_NotFound(t *testing.T) {
180 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