MCPcopy Create free account
hub / github.com/cli/cli / Test_NewCmdList

Function Test_NewCmdList

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

Source from the content-addressed store, hash-verified

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