(t *testing.T)
| 19 | } |
| 20 | |
| 21 | func 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 | |
| 39 | func TestEscapeGraphQLString(t *testing.T) { |
| 40 | tests := []struct { |
nothing calls this directly
no test coverage detected