MCPcopy Index your code
hub / github.com/cli/cli / TestNewCmdUpdate_Flags

Function TestNewCmdUpdate_Flags

pkg/cmd/skills/update/update_test.go:43–52  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

41}
42
43func TestNewCmdUpdate_Flags(t *testing.T) {
44 ios, _, _, _ := iostreams.Test()
45 f := &cmdutil.Factory{IOStreams: ios, Prompter: &prompter.PrompterMock{}, GitClient: &git.Client{}}
46 cmd := NewCmdUpdate(f, func(_ *UpdateOptions) error { return nil })
47
48 flags := []string{"all", "force", "dry-run", "dir", "unpin"}
49 for _, name := range flags {
50 assert.NotNil(t, cmd.Flags().Lookup(name), "missing flag: --%s", name)
51 }
52}
53
54func TestNewCmdUpdate_ArgsPassedToOptions(t *testing.T) {
55 ios, _, stdout, stderr := iostreams.Test()

Callers

nothing calls this directly

Calls 2

TestFunction · 0.92
NewCmdUpdateFunction · 0.85

Tested by

no test coverage detected