Skip to content

Commit

Permalink
Merge pull request #282 from apemberton/org-fix
Browse files Browse the repository at this point in the history
related to JENKINS-34834. updating test for similar condition
  • Loading branch information
kohsuke committed Jun 3, 2016
2 parents 204e639 + 5f95987 commit 01fcbc2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/test/java/org/kohsuke/github/AppTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,12 @@ public void testMyOrganizations() throws IOException {
}

@Test
public void testMyTeamsContainsAllMyOrganizations() throws IOException {
public void testMyOrganizationsContainMyTeams() throws IOException {
Map<String, Set<GHTeam>> teams = gitHub.getMyTeams();
Map<String, GHOrganization> myOrganizations = gitHub.getMyOrganizations();
assertEquals(teams.keySet(), myOrganizations.keySet());
//GitHub no longer has default 'owners' team, so there may be organization memberships without a team
//https://help.github.com/articles/about-improved-organization-permissions/
assertTrue(myOrganizations.keySet().containsAll(teams.keySet()));
}

@Test
Expand Down

0 comments on commit 01fcbc2

Please sign in to comment.