Fix test which was passing for wrong reason.
This commit is contained in:
parent
b5a2c85e66
commit
1b0a4093d9
2 changed files with 6 additions and 1 deletions
|
|
@ -60,8 +60,9 @@ class LoggedInPresenterTest {
|
|||
}.test {
|
||||
val initialState = awaitItem()
|
||||
assertThat(initialState.showSyncSpinner).isFalse()
|
||||
roomListService.postSyncIndicator(RoomListService.SyncIndicator.Show)
|
||||
consumeItemsUntilPredicate { it.showSyncSpinner }
|
||||
roomListService.postState(RoomListService.State.Running)
|
||||
roomListService.postSyncIndicator(RoomListService.SyncIndicator.Hide)
|
||||
consumeItemsUntilPredicate { !it.showSyncSpinner }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,6 +52,10 @@ class FakeRoomListService : RoomListService {
|
|||
roomListStateFlow.emit(state)
|
||||
}
|
||||
|
||||
suspend fun postSyncIndicator(value: RoomListService.SyncIndicator) {
|
||||
syncIndicatorStateFlow.emit(value)
|
||||
}
|
||||
|
||||
var latestSlidingSyncRange: IntRange? = null
|
||||
private set
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue