Skip to content

Commit

Permalink
fix: unit test error
Browse files Browse the repository at this point in the history
  • Loading branch information
easyhooon committed Apr 22, 2024
1 parent 1466a02 commit e98576b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class GetBookmarkedSessionsUseCase @Inject constructor(
private val getBookmarkedSessionIdsUseCase: GetBookmarkedSessionIdsUseCase,
) {

suspend operator fun invoke(): Flow<List<Session>> =
operator fun invoke(): Flow<List<Session>> =
combine(
getSessionsUseCase(),
getBookmarkedSessionIdsUseCase()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import kotlinx.coroutines.flow.flow
class GetSessionsUseCase @Inject constructor(
private val sessionRepository: SessionRepository,
) {
suspend operator fun invoke(): Flow<List<Session>> {
operator fun invoke(): Flow<List<Session>> {
return flow {
emit(sessionRepository.getSessions())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ internal class SessionViewModelTest {
@Test
fun `세션 데이터를 확인할 수 있다`() = runTest {
// given
coEvery { getSessionsUseCase() } returns listOf(fakeSession)
coEvery { getSessionsUseCase() } returns flowOf(listOf(fakeSession))
coEvery { getBookmarkedSessionIdsUseCase() } returns flowOf(emptySet())
viewModel = SessionViewModel(getSessionsUseCase, getBookmarkedSessionIdsUseCase)

Expand Down

0 comments on commit e98576b

Please sign in to comment.