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

Function TestWorktreeSpinnerConfigure

internal/tui/worktree_spinner_test.go:8–29  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

6)
7
8func TestWorktreeSpinnerConfigure(t *testing.T) {
9 s := NewWorktreeSpinner()
10 s.Configure("auth", "chief/auth", "main", ".chief/worktrees/auth/", "")
11
12 if s.prdName != "auth" {
13 t.Errorf("expected prdName 'auth', got %q", s.prdName)
14 }
15 if s.branchName != "chief/auth" {
16 t.Errorf("expected branchName 'chief/auth', got %q", s.branchName)
17 }
18 if s.defaultBranch != "main" {
19 t.Errorf("expected defaultBranch 'main', got %q", s.defaultBranch)
20 }
21
22 // Without setup command, should have 2 steps
23 if len(s.steps) != 2 {
24 t.Errorf("expected 2 steps without setup, got %d", len(s.steps))
25 }
26 if !s.steps[0].active {
27 t.Error("expected first step to be active")
28 }
29}
30
31func TestWorktreeSpinnerConfigureWithSetup(t *testing.T) {
32 s := NewWorktreeSpinner()

Callers

nothing calls this directly

Calls 2

ConfigureMethod · 0.95
NewWorktreeSpinnerFunction · 0.85

Tested by

no test coverage detected