Fix tests.
This commit is contained in:
parent
4990aa38d3
commit
347edb67ab
2 changed files with 12 additions and 7 deletions
|
|
@ -21,8 +21,10 @@ import io.element.android.libraries.matrix.api.sync.SyncState
|
|||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
|
||||
class FakeSyncService : SyncService {
|
||||
private val syncStateFlow = MutableStateFlow(SyncState.Idle)
|
||||
class FakeSyncService(
|
||||
initialState: SyncState = SyncState.Idle
|
||||
) : SyncService {
|
||||
private val syncStateFlow = MutableStateFlow(initialState)
|
||||
|
||||
fun simulateError() {
|
||||
syncStateFlow.value = SyncState.Error
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue