Add biometric lock and rate limit handling
Biometric lock: opt-in Face ID/Touch ID/fingerprint app lock with toggle in ProfileScreen. Locks on background, requires auth on foreground return. Platform implementations: BiometricPrompt (Android), LAContext (iOS). Rate limit: 429 responses parsed with Retry-After header, user-friendly error messages in all 10 locales, retry plugin respects 429. ErrorMessageParser updated for both iOS Swift and KMM.
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package com.tt.honeyDue.storage
|
||||
|
||||
import kotlin.test.Test
|
||||
import kotlin.test.assertFalse
|
||||
import kotlin.test.assertTrue
|
||||
|
||||
/**
|
||||
* Tests for BiometricPreference object.
|
||||
* Tests the common wrapper logic (not platform-specific storage).
|
||||
*/
|
||||
class BiometricPreferenceTest {
|
||||
|
||||
@Test
|
||||
fun biometricPreferenceDefaultsToFalseWhenNotInitialized() {
|
||||
// When no manager is initialized, isBiometricEnabled should return false
|
||||
val uninitializedPreference = BiometricPreference
|
||||
// Note: This tests the fallback behavior when manager is null
|
||||
assertFalse(uninitializedPreference.isBiometricEnabled())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user