mirror of
https://github.com/jlengrand/github-api.git
synced 2026-04-04 15:50:52 +00:00
Merge branch 'master' into addHtmlURL
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user