Skip to content

Commit

Permalink
Add missing dispatcher
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaskioko committed Apr 14, 2022
1 parent 5478ae7 commit ba69115
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import io.mockk.mockk
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.flowOf
import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.test.StandardTestDispatcher
import org.junit.Rule
import org.junit.Test

Expand All @@ -22,9 +23,10 @@ internal class SettingsViewModelTest {
val coroutineRule = MainCoroutineRule()

private val themePreference: TvManiacPreferences = mockk()
private val testCoroutineDispatcher = StandardTestDispatcher()

private val viewModel by lazy {
SettingsViewModel(themePreference)
SettingsViewModel(themePreference, testCoroutineDispatcher)
}

@Test
Expand Down

0 comments on commit ba69115

Please sign in to comment.