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

Function TestCommitMsg_BodyFlag

apps/cli/internal/cli/commit_msg_test.go:224–246  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

222}
223
224func TestCommitMsg_BodyFlag(t *testing.T) {
225 tmpDir := createCommitMsgTestFiles(t)
226 resetCommitMsgFlags()
227 taskDir = tmpDir
228 commitMsgTaskID = "042"
229 commitMsgBody = true
230
231 output, err := captureCommitMsgOutput(t)
232 if err != nil {
233 t.Fatalf("unexpected error: %v", err)
234 }
235
236 if !strings.Contains(output, "- Create command scaffolding") {
237 t.Errorf("expected completed subtask in body, got:\n%s", output)
238 }
239 if !strings.Contains(output, "- Implement message generation") {
240 t.Errorf("expected second completed subtask in body, got:\n%s", output)
241 }
242 // Unchecked subtask should NOT be included
243 if strings.Contains(output, "Add documentation") {
244 t.Errorf("unchecked subtask should not appear in body, got:\n%s", output)
245 }
246}
247
248func TestCommitMsg_BodyFlagNoSubtasks(t *testing.T) {
249 tmpDir := t.TempDir()

Callers

nothing calls this directly

Calls 3

createCommitMsgTestFilesFunction · 0.85
resetCommitMsgFlagsFunction · 0.85
captureCommitMsgOutputFunction · 0.85

Tested by

no test coverage detected