(t *testing.T)
| 1188 | } |
| 1189 | |
| 1190 | func 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 | |
| 1205 | func TestHandleWorklog_EmptyID(t *testing.T) { |
| 1206 | dir := createTestTaskDir(t) |
nothing calls this directly
no test coverage detected