(t *testing.T)
| 68 | } |
| 69 | |
| 70 | func TestCompletionCommand_InvalidShell(t *testing.T) { |
| 71 | rootCmd := &cobra.Command{Use: "gh"} |
| 72 | completionCmd := NewCompletionCommand() |
| 73 | rootCmd.AddCommand(completionCmd) |
| 74 | |
| 75 | rootCmd.SetArgs([]string{"completion", "invalid"}) |
| 76 | err := rootCmd.Execute() |
| 77 | |
| 78 | require.Error(t, err) |
| 79 | assert.Contains(t, err.Error(), "invalid argument") |
| 80 | } |
| 81 | |
| 82 | func TestCompletionCommand_NoArgs(t *testing.T) { |
| 83 | rootCmd := &cobra.Command{Use: "gh"} |
nothing calls this directly
no test coverage detected