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

Function TestRunOpenCmd_ResourceShortcutNoAuth

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

Source from the content-addressed store, hash-verified

89}
90
91func TestRunOpenCmd_ResourceShortcutNoAuth(t *testing.T) {
92 io, _, _, _ := iostreams.Test()
93
94 opts, opened, authed := newTestOptions(io, test.NewDefaultConfigStub())
95 opts.Shortcut = "docs"
96
97 err := runOpenCmd(opts)
98 require.NoError(t, err)
99 assert.False(t, *authed, "resource shortcuts must not require sign-in")
100 assert.Equal(t, "https://algolia.com/doc/", *opened)
101}
102
103func TestRunOpenCmd_ResourceShortcutWithAppID(t *testing.T) {
104 io, _, _, _ := iostreams.Test()

Callers

nothing calls this directly

Calls 4

TestFunction · 0.92
NewDefaultConfigStubFunction · 0.92
newTestOptionsFunction · 0.85
runOpenCmdFunction · 0.85

Tested by

no test coverage detected