mirror of
https://github.com/element-hq/element-android
synced 2024-11-27 03:48:12 +03:00
fix fake awaitTx
This commit is contained in:
parent
8b47bf004e
commit
d759f26db6
2 changed files with 4 additions and 4 deletions
|
@ -39,8 +39,8 @@ internal class FakeMonarchy {
|
|||
mockkStatic("org.matrix.android.sdk.internal.util.MonarchyKt")
|
||||
coEvery {
|
||||
instance.awaitTransaction(any<(Realm) -> Any>())
|
||||
} coAnswers {
|
||||
secondArg<suspend (Realm) -> Any>().invoke(fakeRealm.instance)
|
||||
} answers {
|
||||
secondArg<(Realm) -> Any>().invoke(fakeRealm.instance)
|
||||
}
|
||||
coEvery {
|
||||
instance.doWithRealm(any())
|
||||
|
|
|
@ -34,8 +34,8 @@ internal class FakeRealmConfiguration {
|
|||
|
||||
fun <T> givenAwaitTransaction(realm: Realm) {
|
||||
val transaction = slot<(Realm) -> T>()
|
||||
coEvery { awaitTransaction(instance, capture(transaction)) } coAnswers {
|
||||
secondArg<suspend (Realm) -> T>().invoke(realm)
|
||||
coEvery { awaitTransaction(instance, capture(transaction)) } answers {
|
||||
secondArg<(Realm) -> T>().invoke(realm)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue