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

Function TestIsProtectedBranch

internal/git/git_test.go:132–152  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

130}
131
132func TestIsProtectedBranch(t *testing.T) {
133 tests := []struct {
134 branch string
135 expected bool
136 }{
137 {"main", true},
138 {"master", true},
139 {"develop", false},
140 {"feature/foo", false},
141 {"chief/my-prd", false},
142 }
143
144 for _, tt := range tests {
145 t.Run(tt.branch, func(t *testing.T) {
146 result := IsProtectedBranch(tt.branch)
147 if result != tt.expected {
148 t.Errorf("IsProtectedBranch(%q) = %v, want %v", tt.branch, result, tt.expected)
149 }
150 })
151 }
152}

Callers

nothing calls this directly

Calls 2

IsProtectedBranchFunction · 0.85
RunMethod · 0.80

Tested by

no test coverage detected