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

Function TestAddCommandBooleanFlags

pkg/cli/add_command_test.go:325–338  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

323}
324
325func TestAddCommandBooleanFlags(t *testing.T) {
326 cmd := NewAddCommand(validateEngineStub)
327 flags := cmd.Flags()
328
329 boolFlags := []string{"create-pull-request", "pr", "force", "no-gitattributes", "no-stop-after"}
330
331 for _, flagName := range boolFlags {
332 t.Run(flagName, func(t *testing.T) {
333 flag := flags.Lookup(flagName)
334 require.NotNil(t, flag, "Boolean flag should exist: %s", flagName)
335 assert.Equal(t, "false", flag.DefValue, "Boolean flag should default to false: %s", flagName)
336 })
337 }
338}
339
340func TestAddCommandArgs(t *testing.T) {
341 cmd := NewAddCommand(validateEngineStub)

Callers

nothing calls this directly

Calls 2

NewAddCommandFunction · 0.85
RunMethod · 0.45

Tested by

no test coverage detected