Skip to content

Commit

Permalink
Merge pull request #1419 from thehyve/dev
Browse files Browse the repository at this point in the history
Fix user service test.
  • Loading branch information
ewelinagr authored Jun 29, 2023
2 parents a86cc56 + 5188ca6 commit b62949c
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import static io.fairspace.saturn.auth.RequestContext.getCurrentRequest;
import static io.fairspace.saturn.rdf.SparqlUtils.generateMetadataIri;
import static org.apache.jena.query.DatasetFactory.createTxnMem;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.lenient;
import static org.mockito.Mockito.when;

Expand Down Expand Up @@ -68,7 +69,7 @@ public void setUp() {
return keycloakUser;
})
.collect(Collectors.toList());
when(usersResource.list()).thenReturn(keycloakUsers);
when(usersResource.list(any(), any())).thenReturn(keycloakUsers);

userService = new UserService(ConfigLoader.CONFIG.auth, tx, usersResource);
workspaceService = new WorkspaceService(tx, userService);
Expand All @@ -90,7 +91,7 @@ private void triggerKeycloakUserUpdate() {
// Change Keycloak info, triggering a database write
// when the user cache is refreshed
keycloakUsers.get(0).setLastName("Updated");
when(usersResource.list()).thenReturn(keycloakUsers);
when(usersResource.list(any(), any())).thenReturn(keycloakUsers);
}

/**
Expand Down

0 comments on commit b62949c

Please sign in to comment.