MCPcopy Create free account
hub / github.com/dotzero/git-profile / TestAddRejectsPartialArgs

Function TestAddRejectsPartialArgs

cmd/add_test.go:39–51  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

37}
38
39func TestAddRejectsPartialArgs(t *testing.T) {
40 is := is.New(t)
41
42 cmd := Add(&storageMock{})
43 cmd.SetOut(&bytes.Buffer{})
44 cmd.SetErr(&bytes.Buffer{})
45 cmd.SetArgs([]string{"profile"})
46
47 err := cmd.Execute()
48
49 is.True(err != nil)
50 is.True(strings.Contains(err.Error(), "accepts either no arguments for interactive mode or exactly 3 arguments"))
51}
52
53func TestAddInteractiveStoresOnlyChangedFilledValues(t *testing.T) {
54 is := is.New(t)

Callers

nothing calls this directly

Calls 2

AddFunction · 0.85
ExecuteMethod · 0.80

Tested by

no test coverage detected