summaryrefslogtreecommitdiffstats
path: root/src/test/java/com/gitblit/tests/RedmineUserServiceTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/com/gitblit/tests/RedmineUserServiceTest.java')
-rw-r--r--src/test/java/com/gitblit/tests/RedmineUserServiceTest.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/test/java/com/gitblit/tests/RedmineUserServiceTest.java b/src/test/java/com/gitblit/tests/RedmineUserServiceTest.java
index 75376239..3c6769f0 100644
--- a/src/test/java/com/gitblit/tests/RedmineUserServiceTest.java
+++ b/src/test/java/com/gitblit/tests/RedmineUserServiceTest.java
@@ -2,13 +2,11 @@ package com.gitblit.tests;
import static org.hamcrest.CoreMatchers.is;
-import java.util.HashMap;
-
import org.junit.Test;
import com.gitblit.RedmineUserService;
import com.gitblit.models.UserModel;
-import com.gitblit.tests.mock.MemorySettings;
+import com.gitblit.tests.mock.MockRuntimeManager;
import com.gitblit.utils.StringUtils;
public class RedmineUserServiceTest extends GitblitUnitTest {
@@ -24,7 +22,7 @@ public class RedmineUserServiceTest extends GitblitUnitTest {
@Test
public void testAuthenticate() throws Exception {
RedmineUserService redmineUserService = new RedmineUserService();
- redmineUserService.setup(new MemorySettings(new HashMap<String, Object>()));
+ redmineUserService.setup(new MockRuntimeManager());
redmineUserService.setTestingCurrentUserAsJson(JSON);
UserModel userModel = redmineUserService.authenticate("RedmineAdminId", "RedmineAPIKey".toCharArray());
assertThat(userModel.getName(), is("redmineadminid"));
@@ -37,7 +35,7 @@ public class RedmineUserServiceTest extends GitblitUnitTest {
@Test
public void testAuthenticateNotAdminUser() throws Exception {
RedmineUserService redmineUserService = new RedmineUserService();
- redmineUserService.setup(new MemorySettings(new HashMap<String, Object>()));
+ redmineUserService.setup(new MockRuntimeManager());
redmineUserService.setTestingCurrentUserAsJson(NOT_ADMIN_JSON);
UserModel userModel = redmineUserService.authenticate("RedmineUserId", "RedmineAPIKey".toCharArray());
assertThat(userModel.getName(), is("redmineuserid"));
@@ -50,7 +48,7 @@ public class RedmineUserServiceTest extends GitblitUnitTest {
@Test
public void testLocalAccount() {
RedmineUserService redmineUserService = new RedmineUserService();
- redmineUserService.setup(new MemorySettings(new HashMap<String, Object>()));
+ redmineUserService.setup(new MockRuntimeManager());
UserModel localAccount = new UserModel("bruce");
localAccount.displayName = "Bruce Campbell";