15 lines
502 B
Kotlin
15 lines
502 B
Kotlin
package studio.daybreak.mail
|
|
|
|
import org.junit.Assert.assertFalse
|
|
import org.junit.Assert.assertTrue
|
|
import org.junit.Test
|
|
|
|
class AndroidVaultKeyPolicyTest {
|
|
@Test
|
|
fun newKeyMayBeCreatedOnlyWhenThereIsNoEncryptedStore() {
|
|
assertTrue(AndroidVaultKeyPolicy.shouldCreateKey(hasEncryptedData = false))
|
|
assertFalse(AndroidVaultKeyPolicy.shouldCreateKey(hasEncryptedData = true))
|
|
assertTrue(AndroidVaultKeyPolicy.MISSING_KEY_MESSAGE.contains("not reset or replaced"))
|
|
}
|
|
}
|