Search in sources :

Example 1 with UserPermissionLevel

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);
}
Also used : UserPermissionLevel(com.google.copybara.git.github.api.UserPermissionLevel) Test(org.junit.Test)

Aggregations

UserPermissionLevel (com.google.copybara.git.github.api.UserPermissionLevel)1 Test (org.junit.Test)1