Merge branch 'master' into addHtmlURL

This commit is contained in:
Liam Newman
2020-03-18 08:43:43 -07:00
committed by GitHub
69 changed files with 1857 additions and 739 deletions

View File

@@ -234,16 +234,28 @@ public class AppTest extends AbstractGitHubWireMockTest {
return team.hasMember(gitHub.getMyself());
}
@Ignore("Needs mocking check")
@Test
public void testShouldFetchTeam() throws Exception {
GHOrganization j = gitHub.getOrganization(GITHUB_API_TEST_ORG);
GHTeam teamByName = j.getTeams().get("Core Developers");
GHOrganization organization = gitHub.getOrganization(GITHUB_API_TEST_ORG);
GHTeam teamByName = organization.getTeams().get("Core Developers");
GHTeam teamById = gitHub.getTeam(teamByName.getId());
assertNotNull(teamById);
assertEquals(teamByName, teamById);
assertEquals(teamByName.getId(), teamById.getId());
assertEquals(teamByName.getDescription(), teamById.getDescription());
}
@Test
public void testShouldFetchTeamFromOrganization() throws Exception {
GHOrganization organization = gitHub.getOrganization(GITHUB_API_TEST_ORG);
GHTeam teamByName = organization.getTeams().get("Core Developers");
GHTeam teamById = organization.getTeam(teamByName.getId());
assertNotNull(teamById);
assertEquals(teamByName.getId(), teamById.getId());
assertEquals(teamByName.getDescription(), teamById.getDescription());
}
@Ignore("Needs mocking check")

View File

@@ -119,7 +119,8 @@ public class WireMockStatusReporterTest extends AbstractGitHubWireMockTest {
assertThat(e, Matchers.<Exception>instanceOf(GHFileNotFoundException.class));
assertThat(e.getMessage(),
equalTo("{\"message\":\"Not Found\",\"documentation_url\":\"https://developer.github.com/v3/repos/#get\"}"));
containsString(
"{\"message\":\"Not Found\",\"documentation_url\":\"https://developer.github.com/v3/repos/#get\"}"));
}
@Test