MCPcopy Create free account
hub / github.com/diillson/chatcli / TestHandleGitStatus

Function TestHandleGitStatus

pkg/coder/engine/commands_git_test.go:56–69  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

54}
55
56func TestHandleGitStatus(t *testing.T) {
57 dir := newGitRepo(t)
58 e, out := newGitTestEngine()
59 if err := e.Execute(context.Background(), "git-status", []string{"--dir", dir}); err != nil {
60 t.Fatalf("git-status: %v", err)
61 }
62 s := out.String()
63 if !strings.Contains(s, "main") {
64 t.Errorf("status output missing branch:\n%s", s)
65 }
66 if !strings.Contains(s, "untracked.txt") {
67 t.Errorf("status output missing untracked file:\n%s", s)
68 }
69}
70
71func TestHandleGitBranch(t *testing.T) {
72 dir := newGitRepo(t)

Callers

nothing calls this directly

Calls 5

newGitRepoFunction · 0.85
newGitTestEngineFunction · 0.85
ErrorfMethod · 0.80
ExecuteMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected