(t *testing.T)
| 174 | } |
| 175 | |
| 176 | func mockOAuthAppCredentials(t *testing.T) { |
| 177 | t.Helper() |
| 178 | |
| 179 | restoreOAuthCredentials(t) |
| 180 | setOAuthCredentials(tokenPersonal, "personal-test-key") |
| 181 | setOAuthCredentials(tokenTeamAccess, "team-access-test-key") |
| 182 | setOAuthCredentials(tokenTeamManage, "team-manage-test-key") |
| 183 | readAppCredentials = func(tokType string) (appCredentials, error) { |
| 184 | t.Fatal("app credential prompt should not be used") |
| 185 | return appCredentials{}, nil |
| 186 | } |
| 187 | } |
| 188 | |
| 189 | func mockAuthorization(t *testing.T, code string, accessToken string) { |
| 190 | t.Helper() |
no test coverage detected