mirror of
https://github.com/jlengrand/github-api.git
synced 2026-04-04 08:21:23 +00:00
Integrate full rate limit checking
This commit is contained in:
@@ -32,6 +32,7 @@ public class RateLimitCheckerTest extends AbstractGitHubWireMockTest {
|
||||
public void testGitHubRateLimit() throws Exception {
|
||||
// Customized response that templates the date to keep things working
|
||||
snapshotNotAllowed();
|
||||
GHRateLimit.UnknownLimitRecord.reset();
|
||||
|
||||
assertThat(mockGitHub.getRequestCount(), equalTo(0));
|
||||
|
||||
@@ -45,7 +46,7 @@ public class RateLimitCheckerTest extends AbstractGitHubWireMockTest {
|
||||
.withEndpoint(mockGitHub.apiServer().baseUrl())
|
||||
.build();
|
||||
|
||||
assertThat(gitHub.lastRateLimit(), nullValue());
|
||||
assertThat(gitHub.lastRateLimit(), equalTo(GHRateLimit.Default()));
|
||||
|
||||
// Checks the rate limit before getting myself
|
||||
gitHub.getMyself();
|
||||
|
||||
Reference in New Issue
Block a user