mirror of
https://github.com/jlengrand/github-api.git
synced 2026-04-05 08:21:21 +00:00
massaging this a bit to accept the full URL
This commit is contained in:
@@ -8,17 +8,17 @@ import junit.framework.TestCase;
|
||||
public class GitHubTest extends TestCase {
|
||||
|
||||
public void testGitHubServerWithHttp() throws Exception {
|
||||
GitHub hub = GitHub.connect("http://enterprise.kohsuke.org", "kohsuke", "token", "password");
|
||||
GitHub hub = GitHub.connect("http://enterprise.kohsuke.org/api/v3", "kohsuke", "token", "password");
|
||||
assertEquals("http://enterprise.kohsuke.org/api/v3/test", hub.getApiURL("/test").toString());
|
||||
}
|
||||
|
||||
public void testGitHubServerWithHttps() throws Exception {
|
||||
GitHub hub = GitHub.connect("https://enterprise.kohsuke.org", "kohsuke", "token", "password");
|
||||
GitHub hub = GitHub.connect("https://enterprise.kohsuke.org/api/v3", "kohsuke", "token", "password");
|
||||
assertEquals("https://enterprise.kohsuke.org/api/v3/test", hub.getApiURL("/test").toString());
|
||||
}
|
||||
|
||||
public void testGitHubServerWithoutProtocol() throws Exception {
|
||||
GitHub hub = GitHub.connect("enterprise.kohsuke.org", "kohsuke", "token", "password");
|
||||
GitHub hub = GitHub.connect("https://enterprise.kohsuke.org/api/v3", "kohsuke", "token", "password");
|
||||
assertEquals("https://enterprise.kohsuke.org/api/v3/test", hub.getApiURL("/test").toString());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user