MCPcopy Create free account
hub / github.com/dropbox/dbxcli / TestInitDbxStillRequiresAuthForDropboxCommands

Function TestInitDbxStillRequiresAuthForDropboxCommands

cmd/root_test.go:440–448  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

438}
439
440func TestInitDbxStillRequiresAuthForDropboxCommands(t *testing.T) {
441 t.Setenv(envAccessToken, "")
442 t.Setenv(envAuthFile, filepath.Join(t.TempDir(), "missing-auth.json"))
443
444 cmd := newAuthTestCommand()
445 if err := initDbx(cmd, nil); err == nil {
446 t.Fatal("expected Dropbox command to require auth")
447 }
448}
449
450func TestInitDbxUsesAccessTokenEnv(t *testing.T) {
451 origConfig := config

Callers

nothing calls this directly

Calls 2

newAuthTestCommandFunction · 0.85
initDbxFunction · 0.85

Tested by

no test coverage detected