(t *testing.T)
| 89 | } |
| 90 | |
| 91 | func 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 | |
| 103 | func TestRunOpenCmd_ResourceShortcutWithAppID(t *testing.T) { |
| 104 | io, _, _, _ := iostreams.Test() |
nothing calls this directly
no test coverage detected