Fix branchExists test after signature change
Updated tests to match the new branchExists() signature that returns bool instead of (bool, error). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -257,20 +257,14 @@ func TestBranchExists(t *testing.T) {
|
||||
}
|
||||
currentBranch := strings.TrimSpace(string(output))
|
||||
|
||||
exists, err := wm.branchExists(currentBranch)
|
||||
if err != nil {
|
||||
t.Fatalf("branchExists failed: %v", err)
|
||||
}
|
||||
exists := wm.branchExists(currentBranch)
|
||||
if !exists {
|
||||
t.Errorf("Current branch %s should exist", currentBranch)
|
||||
}
|
||||
})
|
||||
|
||||
t.Run("non-existent branch returns false", func(t *testing.T) {
|
||||
exists, err := wm.branchExists("does-not-exist-branch")
|
||||
if err != nil {
|
||||
t.Fatalf("branchExists failed: %v", err)
|
||||
}
|
||||
exists := wm.branchExists("does-not-exist-branch")
|
||||
if exists {
|
||||
t.Error("Non-existent branch should return false")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user