Skip to content

Commit

Permalink
Merge pull request #144 from swm-nodriversomabus/BUS-202-MVP1-API-test
Browse files Browse the repository at this point in the history
fix(BE): 사용자 조회 오류 BUS-202-MVP1-API-test
  • Loading branch information
Lemonade255 authored Oct 23, 2023
2 parents fc0b4f6 + 84c988a commit e1d9d01
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
public class UserEntity extends BaseEntity {
@Id
@GeneratedValue(strategy = GenerationType.UUID)
@Column(columnDefinition = "BINARY(24)")
@Column(columnDefinition = "BINARY(16)")
private UUID userId;

@OneToOne(fetch = FetchType.LAZY)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ public FindUserDto getUser() {
log.error("UserService::getUser: Authentication is needed");
return this.getDefaultUser();
}
log.info("UserID: {}", securityUser.getUserId());
return findUserPort.getByUserId(securityUser.getUserId())
.map(userMapper::toDto)
.orElse(this.getDefaultUser());
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/com/example/api/user/UserServiceTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ void getAllTest() {

@Test
void getUserByIdTest() {
userService.getUserById(userUUID);
userService.getUser();
verify(findUserPort, times(1)).getByUserId(UUID.fromString(userUUID));
}

Expand Down

0 comments on commit e1d9d01

Please sign in to comment.