MCPcopy Create free account
hub / github.com/github/gh-aw / TestProjectNewCommandFlags

Function TestProjectNewCommandFlags

pkg/cli/project_command_test.go:168–189  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

166}
167
168func TestProjectNewCommandFlags(t *testing.T) {
169 cmd := NewProjectNewCommand()
170
171 // Check standard flags
172 ownerFlag := cmd.Flags().Lookup("owner")
173 require.NotNil(t, ownerFlag, "Should have --owner flag")
174
175 linkFlag := cmd.Flags().Lookup("link")
176 require.NotNil(t, linkFlag, "Should have --link flag")
177
178 // Check project setup flag
179 projectSetupFlag := cmd.Flags().Lookup("with-project-setup")
180 require.NotNil(t, projectSetupFlag, "Should have --with-project-setup flag")
181 assert.Equal(t, "bool", projectSetupFlag.Value.Type(), "Project setup flag should be boolean")
182
183 // Verify removed flags don't exist
184 viewsFlag := cmd.Flags().Lookup("views")
185 assert.Nil(t, viewsFlag, "Should not have --views flag")
186
187 fieldsFlag := cmd.Flags().Lookup("fields")
188 assert.Nil(t, fieldsFlag, "Should not have --fields flag")
189}
190
191func TestParseProjectURL(t *testing.T) {
192 tests := []struct {

Callers

nothing calls this directly

Calls 1

NewProjectNewCommandFunction · 0.85

Tested by

no test coverage detected