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

Function TestSelectMap_NoItems

pkg/question/select_test.go:18–24  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

16}
17
18func TestSelectMap_NoItems(t *testing.T) {
19 pa := []*testutil.PA{}
20 mockAsker, _ := testutil.NewMockAsker(t, pa)
21 selectedItem, err := question.SelectMap(mockAsker, "question", []*string{}, func(item *string) string { return *item })
22 assert.Nil(t, selectedItem)
23 assert.Error(t, err)
24}

Callers

nothing calls this directly

Calls 3

NewMockAskerFunction · 0.92
SelectMapFunction · 0.92
ErrorMethod · 0.45

Tested by

no test coverage detected