Skip to content

Commit

Permalink
HELLODATA-1881 - fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Slawomir Wieczorek committed Dec 19, 2024
1 parent bc780d5 commit 9365b1b
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ public void testCreateUser() {
when(keycloakService.createUser(any())).thenReturn(createdUserId);
when(userRepository.saveAndFlush(any(UserEntity.class))).thenReturn(new UserEntity());
when(userRepresentation.getEmail()).thenReturn("[email protected]");
when(userRepresentation.getUsername()).thenReturn("username");

// when
String result = userService.createUser(email, firstName, lastName);
Expand Down Expand Up @@ -207,6 +208,7 @@ public void testDisableUserById_UserFound() {
UserRepresentation userRepresentation = new UserRepresentation();
userRepresentation.setEnabled(true);
userRepresentation.setEmail("[email protected]");
userRepresentation.setUsername("username");
UserEntity userEntity = new UserEntity();
userEntity.setId(uuid);

Expand Down Expand Up @@ -248,6 +250,7 @@ public void testEnableUserById_UserFound() {
UserRepresentation userRepresentation = new UserRepresentation();
userRepresentation.setEnabled(false);
userRepresentation.setEmail("[email protected]");
userRepresentation.setUsername("username");
UserEntity userEntity = new UserEntity();
userEntity.setId(uuid);
when(userRepository.getByIdOrAuthId(any(String.class))).thenReturn(userEntity);
Expand Down

0 comments on commit 9365b1b

Please sign in to comment.