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

Function TestAdd_InvalidEffort

apps/cli/internal/cli/add_test.go:235–248  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

233}
234
235func TestAdd_InvalidEffort(t *testing.T) {
236 tmpDir := t.TempDir()
237 resetAddFlags()
238 taskDir = tmpDir
239 addEffort = "huge"
240
241 _, err := captureAddOutput(t, "Bad effort")
242 if err == nil {
243 t.Fatal("expected error for invalid effort")
244 }
245 if !strings.Contains(err.Error(), "invalid effort") {
246 t.Errorf("expected 'invalid effort' error, got: %v", err)
247 }
248}
249
250func TestAdd_InvalidStatus(t *testing.T) {
251 tmpDir := t.TempDir()

Callers

nothing calls this directly

Calls 3

resetAddFlagsFunction · 0.85
captureAddOutputFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected