(t *testing.T)
| 11 | ) |
| 12 | |
| 13 | func 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 | |
| 31 | func TestTeamAccountIDFromRequest(t *testing.T) { |
| 32 | gin.SetMode(gin.TestMode) |
nothing calls this directly
no test coverage detected