MCPcopy Create free account
hub / github.com/MiniCodeMonkey/chief / TestRenderEntryWithBranchAndWorktree

Function TestRenderEntryWithBranchAndWorktree

internal/tui/picker_test.go:13–41  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

11)
12
13func TestRenderEntryWithBranchAndWorktree(t *testing.T) {
14 p := &PRDPicker{
15 basePath: "/project",
16 currentPRD: "",
17 entries: []PRDEntry{
18 {
19 Name: "auth",
20 Completed: 8,
21 Total: 8,
22 LoopState: loop.LoopStateComplete,
23 Branch: "chief/auth",
24 WorktreeDir: "/project/.chief/worktrees/auth",
25 },
26 },
27 }
28
29 result := p.renderEntry(p.entries[0], false, 80)
30 if result == "" {
31 t.Fatal("expected non-empty render result")
32 }
33 // Should contain branch name
34 if !containsText(result, "chief/auth") {
35 t.Errorf("expected branch 'chief/auth' in output, got: %s", result)
36 }
37 // Should contain worktree path
38 if !containsText(result, ".chief/worktrees/auth/") {
39 t.Errorf("expected worktree path in output, got: %s", result)
40 }
41}
42
43func TestRenderEntryNoBranch(t *testing.T) {
44 p := &PRDPicker{

Callers

nothing calls this directly

Calls 2

renderEntryMethod · 0.95
containsTextFunction · 0.85

Tested by

no test coverage detected