use of com.google.copybara.git.github.api.UserPermissionLevel in project copybara by google.
the class AbstractGitHubApiTest method testGetUserPermissionLevel.
@Test
public void testGetUserPermissionLevel() throws Exception {
trainMockGet("/repos/example/project/collaborators/foo/permission", getResource("user_permission_level_testdata.json"));
UserPermissionLevel permissionLevel = api.getUserPermissionLevel("example/project", "foo");
assertThat(permissionLevel.getPermission()).isEqualTo(GitHubUserPermission.ADMIN);
}
Aggregations