(t *testing.T)
| 10 | ) |
| 11 | |
| 12 | func TestDisableAuthCheck(t *testing.T) { |
| 13 | cmd := &cobra.Command{Use: "test"} |
| 14 | if IsAuthCheckDisabled(cmd) { |
| 15 | t.Error("expected auth check to be enabled by default") |
| 16 | } |
| 17 | |
| 18 | DisableAuthCheck(cmd) |
| 19 | if !IsAuthCheckDisabled(cmd) { |
| 20 | t.Error("expected auth check to be disabled after DisableAuthCheck") |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | func TestIsAuthCheckDisabled_Inheritance(t *testing.T) { |
| 25 | parent := &cobra.Command{Use: "parent"} |
nothing calls this directly
no test coverage detected