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

Function TestLoginCommandForTokenType

cmd/auth_test.go:510–525  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

508}
509
510func TestLoginCommandForTokenType(t *testing.T) {
511 tests := []struct {
512 tokType string
513 want string
514 }{
515 {tokenPersonal, "dbxcli login"},
516 {tokenTeamAccess, "dbxcli login team-access"},
517 {tokenTeamManage, "dbxcli login team-manage"},
518 }
519
520 for _, tt := range tests {
521 if got := loginCommand(tt.tokType); got != tt.want {
522 t.Fatalf("loginCommand(%q) = %q, want %q", tt.tokType, got, tt.want)
523 }
524 }
525}
526
527func TestRequestAccessTokenRejectsEmptyToken(t *testing.T) {
528 mockOAuthAppCredentials(t)

Callers

nothing calls this directly

Calls 1

loginCommandFunction · 0.85

Tested by

no test coverage detected