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

Function TestNewCmdList

pkg/cmd/repo/list/list_test.go:98–346  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

96}
97
98func TestNewCmdList(t *testing.T) {
99 tests := []struct {
100 name string
101 cli string
102 wants ListOptions
103 wantsErr string
104 }{
105 {
106 name: "no arguments",
107 cli: "",
108 wants: ListOptions{
109 Limit: 30,
110 Owner: "",
111 Visibility: "",
112 Fork: false,
113 Source: false,
114 Language: "",
115 Topic: []string(nil),
116 Archived: false,
117 NonArchived: false,
118 },
119 },
120 {
121 name: "with owner",
122 cli: "monalisa",
123 wants: ListOptions{
124 Limit: 30,
125 Owner: "monalisa",
126 Visibility: "",
127 Fork: false,
128 Source: false,
129 Language: "",
130 Topic: []string(nil),
131 Archived: false,
132 NonArchived: false,
133 },
134 },
135 {
136 name: "with limit",
137 cli: "-L 101",
138 wants: ListOptions{
139 Limit: 101,
140 Owner: "",
141 Visibility: "",
142 Fork: false,
143 Source: false,
144 Language: "",
145 Topic: []string(nil),
146 Archived: false,
147 NonArchived: false,
148 },
149 },
150 {
151 name: "only public",
152 cli: "--visibility=public",
153 wants: ListOptions{
154 Limit: 30,
155 Owner: "",

Callers

nothing calls this directly

Calls 3

EqualMethod · 0.80
NewCmdListFunction · 0.70
RunMethod · 0.65

Tested by

no test coverage detected