Skip to content

Commit

Permalink
fixing broken unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
monitorjbl committed Feb 1, 2016
1 parent 9380fb9 commit c732c1a
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package com.monitorjbl.plugins.config;

import com.atlassian.sal.api.auth.LoginUriProvider;
import com.atlassian.sal.api.user.UserManager;
import com.atlassian.bitbucket.repository.Repository;
import com.atlassian.bitbucket.repository.RepositoryService;
import com.atlassian.bitbucket.permission.Permission;
import com.atlassian.bitbucket.permission.PermissionService;
import com.atlassian.bitbucket.repository.Repository;
import com.atlassian.bitbucket.repository.RepositoryService;
import com.atlassian.bitbucket.user.ApplicationUser;
import com.atlassian.bitbucket.user.UserService;
import com.atlassian.sal.api.auth.LoginUriProvider;
import com.atlassian.sal.api.user.UserManager;
import com.atlassian.templaterenderer.TemplateRenderer;
import com.monitorjbl.plugins.UserUtils;
import org.junit.Before;
import org.junit.Test;
import org.mockito.InjectMocks;
Expand All @@ -31,7 +31,7 @@ public class ConfigServletTest {
@Mock
private UserManager userManager;
@Mock
private UserService userService;
private UserUtils userUtils;
@Mock
private RepositoryService repoService;
@Mock
Expand All @@ -53,7 +53,7 @@ public class ConfigServletTest {
@Before
public void setUp() throws Exception {
MockitoAnnotations.initMocks(this);
when(userService.getUserBySlug("user1")).thenReturn(user);
when(userUtils.getApplicationUserByName("user1")).thenReturn(user);
when(repoService.getBySlug("PRJ", "repo1")).thenReturn(repo);
when(permissionService.hasRepositoryPermission(user, repo, Permission.REPO_ADMIN)).thenReturn(true);
}
Expand Down

0 comments on commit c732c1a

Please sign in to comment.