MCPcopy Index your code
hub / github.com/larksuite/cli / TestIsAuthCheckDisabled_Inheritance

Function TestIsAuthCheckDisabled_Inheritance

internal/cmdutil/annotations_test.go:24–37  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

22}
23
24func TestIsAuthCheckDisabled_Inheritance(t *testing.T) {
25 parent := &cobra.Command{Use: "parent"}
26 child := &cobra.Command{Use: "child"}
27 parent.AddCommand(child)
28
29 if IsAuthCheckDisabled(child) {
30 t.Error("expected child auth check enabled before parent annotation")
31 }
32
33 DisableAuthCheck(parent)
34 if !IsAuthCheckDisabled(child) {
35 t.Error("expected child to inherit disabled auth check from parent")
36 }
37}
38
39func TestIsAuthCheckDisabled_NoInheritanceUpward(t *testing.T) {
40 parent := &cobra.Command{Use: "parent"}

Callers

nothing calls this directly

Calls 3

IsAuthCheckDisabledFunction · 0.85
DisableAuthCheckFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected