mirror of
https://github.com/jlengrand/github-api.git
synced 2026-04-04 08:21:23 +00:00
Improve checkApiUrlValidity() method to support the private mode in GitHub Enterprise servers
This commit is contained in:
@@ -124,6 +124,11 @@ public class GitHubTest {
|
||||
@Test
|
||||
public void testGitHubIsApiUrlValid() throws IOException {
|
||||
GitHub github = GitHub.connectAnonymously();
|
||||
github.checkApiUrlValidity();
|
||||
//GitHub github = GitHub.connectToEnterpriseAnonymously("https://github.mycompany.com/api/v3/");
|
||||
try {
|
||||
github.checkApiUrlValidity();
|
||||
} catch (IOException ioe) {
|
||||
assertTrue(ioe.getMessage().contains("private mode enabled"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user