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

Function TestNewProjectNewCommand

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

Source from the content-addressed store, hash-verified

19}
20
21func TestNewProjectNewCommand(t *testing.T) {
22 cmd := NewProjectNewCommand()
23 require.NotNil(t, cmd, "Command should be created")
24 assert.Equal(t, "new <title>", cmd.Use, "Command usage should be 'new <title>'")
25 assert.Contains(t, cmd.Short, "Create a new GitHub Project V2 board", "Short description should mention board creation")
26 assert.Contains(t, cmd.Long, "https://github.github.com/gh-aw/reference/auth-projects/", "Long description should reference the configured docs host")
27 assert.NotContains(t, cmd.Long, "https://github.github.io/gh-aw/reference/auth-projects/", "Long description should not reference the old docs host")
28
29 // Check flags
30 ownerFlag := cmd.Flags().Lookup("owner")
31 require.NotNil(t, ownerFlag, "Should have --owner flag")
32 assert.Empty(t, ownerFlag.Shorthand, "Owner flag should not define a shorthand to avoid -o collision with output")
33
34 linkFlag := cmd.Flags().Lookup("link")
35 require.NotNil(t, linkFlag, "Should have --link flag")
36 assert.Equal(t, "l", linkFlag.Shorthand, "Link flag should have short form 'l'")
37}
38
39func TestEscapeGraphQLString(t *testing.T) {
40 tests := []struct {

Callers

nothing calls this directly

Calls 1

NewProjectNewCommandFunction · 0.85

Tested by

no test coverage detected