MCPcopy Create free account
hub / github.com/algolia/cli / TestRunOpenCmd_ListIncludesBothKinds

Function TestRunOpenCmd_ListIncludesBothKinds

pkg/cmd/open/open_test.go:272–284  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

270}
271
272func TestRunOpenCmd_ListIncludesBothKinds(t *testing.T) {
273 io, _, stdout, _ := iostreams.Test()
274
275 opts, _, _ := newTestOptions(io, test.NewDefaultConfigStub())
276 opts.List = true
277
278 err := runOpenCmd(opts)
279 require.NoError(t, err)
280
281 out := stdout.String()
282 assert.Contains(t, out, "docs")
283 assert.Contains(t, out, "billing")
284}
285
286func TestRunOpenCmd_ListJSONOutput(t *testing.T) {
287 t.Setenv("ALGOLIA_APPLICATION_ID", "")

Callers

nothing calls this directly

Calls 5

TestFunction · 0.92
NewDefaultConfigStubFunction · 0.92
newTestOptionsFunction · 0.85
runOpenCmdFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected