This commit is contained in:
Eduard Heimbuch
2019-11-20 08:36:18 +01:00
parent 49bdf18fb0
commit 18c94352cf

View File

@@ -61,8 +61,8 @@ class PublicFlagUpdateStepTest {
@Test @Test
void shouldDeleteOldAnonymousUserIfExists() throws JAXBException { void shouldDeleteOldAnonymousUserIfExists() throws JAXBException {
when(userDAO.getAll()).thenReturn(Collections.singleton(new User("anonymous")));
User anonymous = new User("anonymous"); User anonymous = new User("anonymous");
when(userDAO.getAll()).thenReturn(Collections.singleton(anonymous));
doReturn(anonymous).when(userDAO).get("anonymous"); doReturn(anonymous).when(userDAO).get("anonymous");
doReturn(SCMContext.ANONYMOUS).when(userDAO).get(SCMContext.USER_ANONYMOUS); doReturn(SCMContext.ANONYMOUS).when(userDAO).get(SCMContext.USER_ANONYMOUS);