Package com.groupon.jenkins.github.services

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

Related Classes of com.groupon.jenkins.github.services.GithubCurrentUserService

Copyright © 2018 www.massapicom. 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.