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

Function TestFeedCommand_EmptyFeed

apps/cli/internal/cli/feed_test.go:301–324  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

299}
300
301func TestFeedCommand_EmptyFeed(t *testing.T) {
302 resetFeedFlags()
303
304 oldGitLog := gitLogFunc
305 gitLogFunc = func(_ string, _ []string) (string, error) {
306 return "", nil
307 }
308 defer func() { gitLogFunc = oldGitLog }()
309
310 oldGitShow := gitShowFunc
311 gitShowFunc = noopGitShow
312 defer func() { gitShowFunc = oldGitShow }()
313
314 output, err := captureFeedOutput(t, func() error {
315 return runFeed(feedCmd, nil)
316 })
317 if err != nil {
318 t.Fatalf("unexpected error: %v", err)
319 }
320
321 if !strings.Contains(output, "No recent task changes.") {
322 t.Errorf("expected empty feed message, got: %s", output)
323 }
324}
325
326func TestFeedCommand_EmptyFeed_JSON(t *testing.T) {
327 resetFeedFlags()

Callers

nothing calls this directly

Calls 3

resetFeedFlagsFunction · 0.85
captureFeedOutputFunction · 0.85
runFeedFunction · 0.85

Tested by

no test coverage detected