Skip to content

Commit 25bbb1f

Browse files
committed
test: verify boost triggers background sync
1 parent ead195a commit 25bbb1f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/src/test/java/to/bitkit/ui/sheets/BoostTransactionViewModelTest.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import app.cash.turbine.test
44
import com.synonym.bitkitcore.Activity
55
import com.synonym.bitkitcore.OnchainActivity
66
import com.synonym.bitkitcore.PaymentType
7+
import kotlinx.coroutines.Job
78
import kotlinx.coroutines.test.runTest
89
import org.junit.Before
910
import org.junit.Test
@@ -62,6 +63,7 @@ class BoostTransactionViewModelTest : BaseUnitTest() {
6263
activityRepo = activityRepo
6364
)
6465
wheneverBlocking { lightningRepo.listSpendableOutputs() }.thenReturn(Result.success(emptyList()))
66+
whenever(lightningRepo.syncAsync()).thenReturn(Job())
6567
}
6668

6769
@Test
@@ -224,6 +226,7 @@ class BoostTransactionViewModelTest : BaseUnitTest() {
224226
}
225227

226228
verify(lightningRepo).accelerateByCpfp(any(), any(), any())
229+
verify(lightningRepo).syncAsync()
227230
verify(activityRepo).updateActivity(any(), any(), any())
228231
verify(activityRepo, never()).deleteActivity(any())
229232
}

0 commit comments

Comments
 (0)