MCPcopy Create free account
hub / github.com/OctopusDeploy/cli / TestAskName

Function TestAskName

pkg/question/input_test.go:71–81  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

69}
70
71func TestAskName(t *testing.T) {
72 pa := []*testutil.PA{
73 testutil.NewInputPrompt("prefix Name", "A short, memorable, unique name for this resource.", "answer"),
74 }
75 qa, _ := testutil.NewMockAsker(t, pa)
76
77 var value string
78 err := question.AskName(qa, "prefix ", "resource", &value)
79 assert.NoError(t, err)
80 assert.Equal(t, value, "answer")
81}

Callers

nothing calls this directly

Calls 3

NewInputPromptFunction · 0.92
NewMockAskerFunction · 0.92
AskNameFunction · 0.92

Tested by

no test coverage detected