Add getTeam by id function

This commit is contained in:
Karol Lassak
2019-03-18 14:15:29 +01:00
parent fad203a66d
commit 87245ab79f
2 changed files with 18 additions and 0 deletions

View File

@@ -245,6 +245,17 @@ public class AppTest extends AbstractGitHubApiTestBase {
assertNotNull(team);
return team.hasMember(gitHub.getMyself());
}
@Test
public void testShouldFetchTeam() throws Exception {
GHOrganization j = gitHub.getOrganization("github-api-test-org");
GHTeam teamByName = j.getTeams().get("Core Developers");
GHTeam teamById = gitHub.getTeam(teamByName.getId());
assertNotNull(teamById);
assertEquals(teamByName, teamById);
}
@Test
public void testFetchPullRequest() throws Exception {