MCPcopy Create free account
hub / github.com/aurora-develop/aurora / TestSplitAuthorizationTokenAndTeam

Function TestSplitAuthorizationTokenAndTeam

initialize/handlers_test.go:13–29  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

11)
12
13func TestSplitAuthorizationTokenAndTeam(t *testing.T) {
14 token, teamID := splitAuthorizationTokenAndTeam("Bearer access-token,team-account-id")
15 if token != "access-token" {
16 t.Fatalf("token = %q, want %q", token, "access-token")
17 }
18 if teamID != "team-account-id" {
19 t.Fatalf("teamID = %q, want %q", teamID, "team-account-id")
20 }
21
22 token, teamID = splitAuthorizationTokenAndTeam("Bearer access-token")
23 if token != "access-token" {
24 t.Fatalf("token = %q, want %q", token, "access-token")
25 }
26 if teamID != "" {
27 t.Fatalf("teamID = %q, want empty", teamID)
28 }
29}
30
31func TestTeamAccountIDFromRequest(t *testing.T) {
32 gin.SetMode(gin.TestMode)

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected