Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 44cf5baa authored by Jonathan Klee's avatar Jonathan Klee
Browse files

tests: fix unit tests warnings

parent dee37dd6
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -57,6 +57,7 @@ class UpdatesWorkManagerTest {
    @After
    fun teardown() {
        workManager.cancelAllWork().result.get()
        WorkManagerTestInitHelper.closeWorkDatabase()
    }

    @Test
+6 −0
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@ import io.mockk.spyk
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.test.runTest
import org.junit.After
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.kotlin.any
@@ -74,6 +75,11 @@ import kotlin.test.assertFalse
@Config(sdk = [Build.VERSION_CODES.R])
class UpdatesWorkerTest {

    @After
    fun teardown() {
        WorkManagerTestInitHelper.closeWorkDatabase()
    }

    @Test
    fun doWork_retriesUpdatesAfterAuthRefresh() = runTest {
        val workerContext = mock<Context>()
+1 −0
Original line number Diff line number Diff line
@@ -61,6 +61,7 @@ class InstallWorkManagerTest {
    fun teardown() {
        workManager.cancelAllWork().result.get()
        Thread.interrupted()
        WorkManagerTestInitHelper.closeWorkDatabase()
    }

    @Test
+1 −0
Original line number Diff line number Diff line
@@ -89,6 +89,7 @@ class InstallOrchestratorTest {
            unmockkObject(InstallWorkManager)
            isInstallWorkManagerMocked = false
        }
        WorkManagerTestInitHelper.closeWorkDatabase()
    }

    @Test