Fix test
This commit is contained in:
parent
215015c0a4
commit
f35fd25baa
1 changed files with 5 additions and 5 deletions
|
|
@ -8,18 +8,18 @@
|
||||||
package io.element.android.libraries.matrix.impl.roomdirectory
|
package io.element.android.libraries.matrix.impl.roomdirectory
|
||||||
|
|
||||||
import io.element.android.libraries.matrix.impl.fixtures.fakes.FakeRustClient
|
import io.element.android.libraries.matrix.impl.fixtures.fakes.FakeRustClient
|
||||||
import io.element.android.tests.testutils.testCoroutineDispatchers
|
import io.element.android.tests.testutils.runCancellableScopeTestWithTestScope
|
||||||
import kotlinx.coroutines.test.runTest
|
import kotlinx.coroutines.test.StandardTestDispatcher
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
|
|
||||||
class RustRoomDirectoryServiceTest {
|
class RustRoomDirectoryServiceTest {
|
||||||
@Test
|
@Test
|
||||||
fun test() = runTest {
|
fun test() = runCancellableScopeTestWithTestScope { testScope, cancellableScope ->
|
||||||
val client = FakeRustClient()
|
val client = FakeRustClient()
|
||||||
val sut = RustRoomDirectoryService(
|
val sut = RustRoomDirectoryService(
|
||||||
client = client,
|
client = client,
|
||||||
sessionDispatcher = testCoroutineDispatchers().io,
|
sessionDispatcher = StandardTestDispatcher(testScope.testScheduler),
|
||||||
)
|
)
|
||||||
sut.createRoomDirectoryList(this)
|
sut.createRoomDirectoryList(cancellableScope)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue