Add more tests.

This commit is contained in:
Benoit Marty
2025-09-13 00:14:57 +02:00
parent 514db70656
commit 61542f2080
4 changed files with 35 additions and 0 deletions

View File

@@ -8,9 +8,11 @@
package io.element.android.features.lockscreen.impl
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.platform.app.InstrumentationRegistry
import com.bumble.appyx.core.modality.BuildContext
import com.google.common.truth.Truth.assertThat
import io.element.android.features.lockscreen.api.LockScreenEntryPoint
import io.element.android.features.lockscreen.impl.unlock.activity.PinUnlockActivity
import io.element.android.tests.testutils.lambda.lambdaError
import io.element.android.tests.testutils.node.TestParentNode
import org.junit.Test
@@ -59,4 +61,11 @@ class DefaultLockScreenEntryPointTest {
assertThat(result.plugins).contains(LockScreenFlowNode.Inputs(LockScreenFlowNode.NavTarget.Settings))
assertThat(result.plugins).contains(callback)
}
@Test
fun `test pin unlock intent`() {
val entryPoint = DefaultLockScreenEntryPoint()
val result = entryPoint.pinUnlockIntent(InstrumentationRegistry.getInstrumentation().context)
assertThat(result.component?.className).isEqualTo(PinUnlockActivity::class.qualifiedName)
}
}