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

Commit 592e1f61 authored by Joshua McCloskey's avatar Joshua McCloskey
Browse files

Fix BiometricProvider test

Test: atest BiometricSettingsProviderTest
Fixes: 313342682
Change-Id: If9109e5b822f1b41972305913d6a0b56704d2ed7
parent a16a36c9
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -26,7 +26,6 @@ import android.platform.test.flag.junit.DeviceFlagsValueProvider
import com.android.settings.flags.Flags
import com.google.common.truth.Truth.assertThat
import org.junit.Before
import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
@@ -46,7 +45,9 @@ class BiometricSettingsProviderTest {

  @Before
  fun setUp() {
    whenever(context.resources).thenReturn(resources)
    provider = BiometricSettingsProvider()
    provider.attachInfo(context, null)
  }

  @Test(expected = UnsupportedOperationException::class)
@@ -74,16 +75,14 @@ class BiometricSettingsProviderTest {
    provider.update(Uri.EMPTY, null, null, null)
  }

  @Ignore("b/313342682")
  @Test
  @RequiresFlagsEnabled(Flags.FLAG_BIOMETRIC_SETTINGS_PROVIDER)
  fun getSuggestionState_shouldQueryFeatureProvider() {
    val expectedValue = false
    setSupportFaceEnroll(expectedValue)

    val bundle =
      provider.call(BiometricSettingsProvider.GET_SUW_FACE_ENABLED, null, Bundle())
    assertThat(bundle!!.getString(BiometricSettingsProvider.SUW_FACE_ENABLED))
    val bundle = provider.call(BiometricSettingsProvider.GET_SUW_FACE_ENABLED, null, Bundle())
    assertThat(bundle!!.getBoolean(BiometricSettingsProvider.SUW_FACE_ENABLED))
      .isEqualTo(expectedValue)
  }