Fix test for mac.

fork-5.53.8
Cody Henthorne 2021-09-03 20:33:03 -04:00
rodzic 76d1490810
commit b816f901a5
1 zmienionych plików z 7 dodań i 0 usunięć

Wyświetl plik

@ -2,6 +2,7 @@ package org.thoughtcrime.securesms.crypto.storage
import android.content.Context
import junit.framework.Assert.assertEquals
import org.junit.Before
import org.junit.Test
import org.mockito.Mockito.`when`
import org.mockito.Mockito.mock
@ -12,6 +13,7 @@ import org.thoughtcrime.securesms.database.model.IdentityStoreRecord
import org.whispersystems.libsignal.IdentityKey
import org.whispersystems.libsignal.SignalProtocolAddress
import org.whispersystems.libsignal.ecc.ECPublicKey
import org.whispersystems.signalservice.test.LibSignalLibraryUtil.assumeLibSignalSupportedOnOS
class TextSecureIdentityKeyStoreTest {
@ -19,6 +21,11 @@ class TextSecureIdentityKeyStoreTest {
private const val ADDRESS = "address1"
}
@Before
fun ensureNativeSupported() {
assumeLibSignalSupportedOnOS()
}
@Test
fun `getIdentity() hits disk on first retrieve but not the second`() {
val mockDb = mock(IdentityDatabase::class.java)