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

Function TestWithRootNamespaceSkipsTeamManage

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

Source from the content-addressed store, hash-verified

648}
649
650func TestWithRootNamespaceSkipsTeamManage(t *testing.T) {
651 cfg := makeDropboxConfig("team-token", false, "", "")
652 stubUsersClient(t, &mockUsersClient{
653 getCurrentAccountFn: func() (*users.FullAccount, error) {
654 t.Fatal("team manage token should not fetch current account")
655 return nil, nil
656 },
657 })
658
659 got := withRootNamespace(cfg, tokenTeamManage)
660
661 if got.PathRoot != "" {
662 t.Fatalf("path root = %q, want empty", got.PathRoot)
663 }
664}
665
666func assertCurrentAuthContext(t *testing.T, source string, refreshable bool, authFile string) {
667 t.Helper()

Callers

nothing calls this directly

Calls 3

makeDropboxConfigFunction · 0.85
stubUsersClientFunction · 0.85
withRootNamespaceFunction · 0.85

Tested by

no test coverage detected