mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-20 02:58:45 +00:00
Add missing unmockk calls in various unit tests.
This commit is contained in:
@@ -5,8 +5,10 @@ import io.mockk.every
|
||||
import io.mockk.mockk
|
||||
import io.mockk.mockkObject
|
||||
import io.mockk.mockkStatic
|
||||
import io.mockk.unmockkAll
|
||||
import io.mockk.verify
|
||||
import io.reactivex.rxjava3.core.Single
|
||||
import org.junit.After
|
||||
import org.junit.Before
|
||||
import org.junit.BeforeClass
|
||||
import org.junit.Rule
|
||||
@@ -90,6 +92,11 @@ class SafetyNumberRepositoryTest {
|
||||
every { Recipient.self() } returns recipientPool[0]
|
||||
}
|
||||
|
||||
@After
|
||||
fun tearDown() {
|
||||
unmockkAll()
|
||||
}
|
||||
|
||||
/**
|
||||
* Batch request for a current identity key should return an empty list and not perform any identity key updates.
|
||||
*/
|
||||
|
||||
@@ -10,7 +10,9 @@ import io.mockk.every
|
||||
import io.mockk.mockk
|
||||
import io.mockk.mockkObject
|
||||
import io.mockk.mockkStatic
|
||||
import io.mockk.unmockkAll
|
||||
import io.mockk.verify
|
||||
import org.junit.After
|
||||
import org.junit.Before
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
@@ -95,6 +97,11 @@ class InAppPaymentRecurringContextJobTest {
|
||||
}
|
||||
}
|
||||
|
||||
@After
|
||||
fun tearDown() {
|
||||
unmockkAll()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `Given user is unregistered, when I run then I expect failure`() {
|
||||
every { mockSignalStore.account.isRegistered } returns true
|
||||
|
||||
@@ -6,6 +6,7 @@ import io.mockk.mockk
|
||||
import io.mockk.mockkStatic
|
||||
import io.mockk.runs
|
||||
import io.mockk.slot
|
||||
import io.mockk.unmockkAll
|
||||
import io.mockk.verify
|
||||
import io.reactivex.rxjava3.plugins.RxJavaPlugins
|
||||
import io.reactivex.rxjava3.schedulers.TestScheduler
|
||||
@@ -44,6 +45,7 @@ class StoriesTest {
|
||||
@After
|
||||
fun tearDown() {
|
||||
RxJavaPlugins.reset()
|
||||
unmockkAll()
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -131,7 +131,7 @@ class AudioDeviceConfigTest {
|
||||
|
||||
@After
|
||||
fun tearDown() {
|
||||
mockkStatic(AppDependencies::class)
|
||||
unmockkStatic(AppDependencies::class)
|
||||
unmockkStatic(PackageManager::class)
|
||||
unmockkObject(RemoteConfig)
|
||||
unmockkStatic(AcousticEchoCanceler::class)
|
||||
|
||||
Reference in New Issue
Block a user