mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-26 14:17:22 +00:00
feat: add a wrapper hash to track home diff util changes for wrapper contact recipient info, add test for dirty state in double set
This commit is contained in:
@@ -47,6 +47,22 @@ class InstrumentedTests {
|
||||
assertArrayEquals(kp.secretKey.take(32).toByteArray(), seed)
|
||||
}
|
||||
|
||||
@Test
|
||||
private fun testDirtyEmptyString() {
|
||||
val contacts = Contacts.newInstance(keyPair.secretKey)
|
||||
val definitelyRealId = "050000000000000000000000000000000000000000000000000000000000000000"
|
||||
val contact = contacts.getOrConstruct(definitelyRealId)
|
||||
contacts.set(contact)
|
||||
assertTrue(contacts.dirty())
|
||||
contacts.set(contact.copy(name = "test"))
|
||||
assertTrue(contacts.dirty())
|
||||
val push = contacts.push()
|
||||
contacts.confirmPushed(push.seqNo, "abc123")
|
||||
contacts.set(contact.copy(name = "test2"))
|
||||
contacts.set(contact.copy(name = "test"))
|
||||
assertFalse(contacts.dirty())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun jni_contacts() {
|
||||
val contacts = Contacts.newInstance(keyPair.secretKey)
|
||||
|
||||
Reference in New Issue
Block a user