Examples of GithubCurrentUserService


Examples of com.groupon.jenkins.github.services.GithubCurrentUserService

public class GithubReposControllerTest {

    @Test
    public void should_show_repos_with_admin_access_only() {
        final GithubCurrentUserService githubCurrentUser = mock(GithubCurrentUserService.class);
        GHRepository repoWithAdminAccess = mock(GHRepository.class);
        when(repoWithAdminAccess.hasAdminAccess()).thenReturn(true);
        when(githubCurrentUser.getRepositories("meow")).thenReturn(map("one", mock(GHRepository.class), "two", repoWithAdminAccess));
        GithubReposController controller = new GithubReposController() {
            @Override
            protected GithubCurrentUserService getCurrentUser() {
                return githubCurrentUser;
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.