Skip to content

Commit

Permalink
fix: userServiceTest
Browse files Browse the repository at this point in the history
  • Loading branch information
ShiinaKin committed Oct 28, 2024
1 parent dbf5cac commit 71575d9
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -539,13 +539,16 @@ class UserServiceTest {
isBanned = false,
createTime = now,
imageCount = imageCountAndTotalSizeDTO.count,
totalImageSize = imageCountAndTotalSizeDTO.totalSize,
albumCount = 1,
totalImageSize = imageCountAndTotalSizeDTO.totalSize / 1024 / 1024.0,
allSize = group.config.groupStrategyConfig.maxSize / 1024 / 1024.0
)

coEvery { DatabaseSingleton.dbQuery<UserVO>(any()) } coAnswers {
this.arg<suspend () -> UserVO>(0).invoke()
}
every { userDao.findUserById(userId) } returns user
every { albumDao.countAlbumByUserId(userId) } returns 1L
every { groupDao.findGroupById(user.groupId) } returns group
every { imageDao.getImageCountAndTotalSizeOfUser(userId) } returns imageCountAndTotalSizeDTO

Expand Down

0 comments on commit 71575d9

Please sign in to comment.