Skip to content

Commit

Permalink
fix fake awaitTx
Browse files Browse the repository at this point in the history
  • Loading branch information
BillCarsonFr committed Nov 16, 2022
1 parent 891437a commit 6d56967
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}

0 comments on commit 6d56967

Please sign in to comment.