(t *testing.T)
| 147 | } |
| 148 | |
| 149 | func TestParseTaskContent_MinimalTask(t *testing.T) { |
| 150 | content := []byte(`--- |
| 151 | id: "002" |
| 152 | title: "Minimal Task" |
| 153 | --- |
| 154 | |
| 155 | Body content here. |
| 156 | `) |
| 157 | |
| 158 | task, err := ParseTaskContent("minimal.md", content) |
| 159 | if err != nil { |
| 160 | t.Fatalf("expected no error, got: %v", err) |
| 161 | } |
| 162 | |
| 163 | if task.ID != "002" { |
| 164 | t.Errorf("expected ID '002', got '%s'", task.ID) |
| 165 | } |
| 166 | |
| 167 | if task.Title != "Minimal Task" { |
| 168 | t.Errorf("expected title 'Minimal Task', got '%s'", task.Title) |
| 169 | } |
| 170 | |
| 171 | if task.Body != "Body content here." { |
| 172 | t.Errorf("expected body 'Body content here.', got '%s'", task.Body) |
| 173 | } |
| 174 | } |
| 175 | |
| 176 | func TestParseTaskContent_EmptyFile(t *testing.T) { |
| 177 | content := []byte("") |
nothing calls this directly
no test coverage detected