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

Function TestSet_Owner

apps/cli/internal/cli/set_test.go:229–249  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

227}
228
229func TestSet_Owner(t *testing.T) {
230 tmpDir := createSetTestFiles(t)
231 resetSetFlags()
232 taskDir = tmpDir
233 setTaskID = "001"
234 setOwner = "alice"
235
236 output, err := captureSetOutput(t)
237 if err != nil {
238 t.Fatalf("unexpected error: %v", err)
239 }
240
241 if !strings.Contains(output, "owner: (unset) -> alice") {
242 t.Errorf("Expected owner change in output, got: %s", output)
243 }
244
245 content, _ := os.ReadFile(filepath.Join(tmpDir, "001-setup.md"))
246 if !strings.Contains(string(content), "owner: alice") {
247 t.Errorf("Expected file to contain owner: alice, got:\n%s", string(content))
248 }
249}
250
251func TestSet_OwnerUpdateExisting(t *testing.T) {
252 tmpDir := t.TempDir()

Callers

nothing calls this directly

Calls 3

createSetTestFilesFunction · 0.85
resetSetFlagsFunction · 0.85
captureSetOutputFunction · 0.85

Tested by

no test coverage detected