GET /api/tasks/{id}/worklog tests
(t *testing.T, dir, taskID, content string)
| 1109 | // GET /api/tasks/{id}/worklog tests |
| 1110 | |
| 1111 | func createWorklogFile(t *testing.T, dir, taskID, content string) { |
| 1112 | t.Helper() |
| 1113 | wlDir := filepath.Join(dir, ".worklogs") |
| 1114 | if err := os.MkdirAll(wlDir, 0755); err != nil { |
| 1115 | t.Fatalf("failed to create worklogs dir: %v", err) |
| 1116 | } |
| 1117 | if err := os.WriteFile(filepath.Join(wlDir, taskID+".md"), []byte(content), 0644); err != nil { |
| 1118 | t.Fatalf("failed to write worklog file: %v", err) |
| 1119 | } |
| 1120 | } |
| 1121 | |
| 1122 | func TestHandleWorklog_NoWorklog(t *testing.T) { |
| 1123 | dir := createTestTaskDir(t) |
no outgoing calls
no test coverage detected