(t *testing.T)
| 80 | } |
| 81 | |
| 82 | func TestCompletionCommand_NoArgs(t *testing.T) { |
| 83 | rootCmd := &cobra.Command{Use: "gh"} |
| 84 | completionCmd := NewCompletionCommand() |
| 85 | rootCmd.AddCommand(completionCmd) |
| 86 | |
| 87 | rootCmd.SetArgs([]string{"completion"}) |
| 88 | err := rootCmd.Execute() |
| 89 | |
| 90 | require.Error(t, err) |
| 91 | assert.Contains(t, err.Error(), "accepts 1 arg(s)") |
| 92 | } |
| 93 | |
| 94 | func TestCompletionCommand_InstallSubcommand(t *testing.T) { |
| 95 | cmd := NewCompletionCommand() |
nothing calls this directly
no test coverage detected