(t *testing.T)
| 130 | } |
| 131 | |
| 132 | func 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 | } |
nothing calls this directly
no test coverage detected