Skip to content

Commit

Permalink
fix: fix test cases
Browse files Browse the repository at this point in the history
fix: LEARNER-9876
  • Loading branch information
omerhabib26 committed Mar 21, 2024
1 parent a704b18 commit 4a4135b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,7 @@ class CourseOutlineViewModelTest {
coEvery { workerController.saveModels(any()) } returns Unit
coEvery { downloadDao.readAllData() } returns flow { emit(emptyList()) }
every { config.isCourseNestedListEnabled() } returns false
every { coreAnalytics.logEvent(any(), any()) } returns Unit

val viewModel = CourseOutlineViewModel(
"",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ class CourseSectionViewModelTest {
coEvery { downloadDao.readAllData() } returns flow {
emit(listOf(DownloadModelEntity.createFrom(downloadModel)))
}
every { coreAnalytics.logEvent(any(), any()) } returns Unit

viewModel.saveDownloadModels("", "")
advanceUntilIdle()
Expand Down Expand Up @@ -305,6 +306,7 @@ class CourseSectionViewModelTest {
coEvery { downloadDao.readAllData() } returns flow {
emit(listOf(DownloadModelEntity.createFrom(downloadModel)))
}
every { coreAnalytics.logEvent(any(), any()) } returns Unit

viewModel.saveDownloadModels("", "")
advanceUntilIdle()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ class CourseVideoViewModelTest {
every { preferencesManager.videoSettings.wifiDownloadOnly } returns false
every { networkConnection.isWifiConnected() } returns true
coEvery { workerController.saveModels(any()) } returns Unit
every { coreAnalytics.logEvent(any(), any()) } returns Unit

viewModel.saveDownloadModels("", "")
advanceUntilIdle()
Expand Down Expand Up @@ -353,6 +354,7 @@ class CourseVideoViewModelTest {
coEvery { downloadDao.readAllData() } returns flow {
emit(listOf(DownloadModelEntity.createFrom(downloadModel)))
}
every { coreAnalytics.logEvent(any(), any()) } returns Unit

viewModel.saveDownloadModels("", "")
advanceUntilIdle()
Expand Down

0 comments on commit 4a4135b

Please sign in to comment.