MCPcopy
hub / github.com/cli/cli / Test_NewCmdList

Function Test_NewCmdList

pkg/cmd/secret/list/list_test.go:28–121  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

26)
27
28func Test_NewCmdList(t *testing.T) {
29 tests := []struct {
30 name string
31 cli string
32 wants ListOptions
33 }{
34 {
35 name: "repo",
36 cli: "",
37 wants: ListOptions{
38 OrgName: "",
39 },
40 },
41 {
42 name: "org",
43 cli: "-oUmbrellaCorporation",
44 wants: ListOptions{
45 OrgName: "UmbrellaCorporation",
46 },
47 },
48 {
49 name: "env",
50 cli: "-eDevelopment",
51 wants: ListOptions{
52 EnvName: "Development",
53 },
54 },
55 {
56 name: "user",
57 cli: "-u",
58 wants: ListOptions{
59 UserSecrets: true,
60 },
61 },
62 {
63 name: "Dependabot repo",
64 cli: "--app Dependabot",
65 wants: ListOptions{
66 Application: "Dependabot",
67 },
68 },
69 {
70 name: "Dependabot org",
71 cli: "--app Dependabot --org UmbrellaCorporation",
72 wants: ListOptions{
73 Application: "Dependabot",
74 OrgName: "UmbrellaCorporation",
75 },
76 },
77 {
78 name: "Agents repo",
79 cli: "--app Agents",
80 wants: ListOptions{
81 Application: "Agents",
82 },
83 },
84 {
85 name: "Agents org",

Callers

nothing calls this directly

Calls 4

TestFunction · 0.92
EqualMethod · 0.80
NewCmdListFunction · 0.70
RunMethod · 0.65

Tested by

no test coverage detected