James Moger
2013-11-18 cacf8bff097fbb66a7be1bfe267b5da2605145f8
src/test/java/com/gitblit/tests/RedmineUserServiceTest.java
@@ -1,10 +1,6 @@
package com.gitblit.tests;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import java.util.HashMap;
@@ -15,7 +11,7 @@
import com.gitblit.tests.mock.MemorySettings;
import com.gitblit.utils.StringUtils;
public class RedmineUserServiceTest {
public class RedmineUserServiceTest extends GitblitUnitTest {
    private static final String JSON = "{\"user\":{\"created_on\":\"2011-03-28T00:41:29Z\",\"lastname\":\"foo\","
        + "\"last_login_on\":\"2012-09-06T23:59:26Z\",\"firstname\":\"baz\","
@@ -50,7 +46,7 @@
        assertNotNull(userModel.cookie);
        assertThat(userModel.canAdmin, is(false));
    }
    @Test
   public void testLocalAccount() {
        RedmineUserService redmineUserService = new RedmineUserService();
@@ -62,8 +58,8 @@
      redmineUserService.deleteUser(localAccount.username);
      assertTrue("Failed to add local account",
            redmineUserService.updateUserModel(localAccount));
      assertEquals("Accounts are not equal!",
            localAccount,
      assertEquals("Accounts are not equal!",
            localAccount,
            redmineUserService.authenticate(localAccount.username, "gimmesomesugar".toCharArray()));
      assertTrue("Failed to delete local account!",
            redmineUserService.deleteUser(localAccount.username));