Merge pull request #777 from bitwiseman/issue/775

Reverse removal of misnamed gitHttpTransportUrl
This commit is contained in:
Liam Newman
2020-04-06 09:38:47 -07:00
committed by GitHub
6 changed files with 116 additions and 90 deletions

View File

@@ -26,6 +26,31 @@ public class GHRepositoryTest extends AbstractGitHubWireMockTest {
return gitHub.getOrganization("github-api-test-org").getRepository("github-api");
}
@Test
public void testGetters() throws IOException {
GHRepository r = getTempRepository();
assertThat(r.hasAdminAccess(), is(true));
assertThat(r.hasDownloads(), is(true));
assertThat(r.hasIssues(), is(true));
assertThat(r.hasPages(), is(false));
assertThat(r.hasProjects(), is(true));
assertThat(r.hasPullAccess(), is(true));
assertThat(r.hasPushAccess(), is(true));
assertThat(r.hasWiki(), is(true));
assertThat(r.isAllowMergeCommit(), is(true));
assertThat(r.isAllowRebaseMerge(), is(true));
assertThat(r.isAllowSquashMerge(), is(true));
String httpTransport = "https://github.com/github-api-test-org/temp-testGetters.git";
assertThat(r.getHttpTransportUrl(), equalTo(httpTransport));
assertThat(r.gitHttpTransportUrl(), equalTo(httpTransport));
assertThat(r.getName(), equalTo("temp-testGetters"));
assertThat(r.getFullName(), equalTo("github-api-test-org/temp-testGetters"));
}
@Test
public void archive() throws Exception {
snapshotNotAllowed();
@@ -274,14 +299,6 @@ public class GHRepositoryTest extends AbstractGitHubWireMockTest {
assertTrue(actual.contains("to fix issue"));
}
@Test
public void getMergeOptions() throws IOException {
GHRepository r = getTempRepository();
assertNotNull(r.isAllowMergeCommit());
assertNotNull(r.isAllowRebaseMerge());
assertNotNull(r.isAllowSquashMerge());
}
@Test
public void setMergeOptions() throws IOException {
// String repoName = "github-api-test-org/test-mergeoptions";