Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hermannakos committed Nov 23, 2023
1 parent 8cf5726 commit e30d261
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class LoginViewModel @Inject constructor(
// We need to wait for the user to be set in ApiPrefs
private suspend fun waitForUser() {
repeat(30) {
if (ApiPrefs.user != null) return
if (apiPrefs.user != null) return
delay(100)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ class LoginViewModelTest {
fun setUp() {
lifecycleRegistry.handleLifecycleEvent(Lifecycle.Event.ON_CREATE)
Dispatchers.setMain(testDispatcher)

every { apiPrefs.user } returns mockk()
}

@After
Expand Down

0 comments on commit e30d261

Please sign in to comment.