mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-25 20:23:19 +00:00
Make ACI's optional on ContactRecords.
This commit is contained in:
@@ -69,7 +69,7 @@ class ContactRecordProcessorTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `isInvalid, missing serviceId, true`() {
|
||||
fun `isInvalid, missing ACI and PNI, true`() {
|
||||
// GIVEN
|
||||
val subject = ContactRecordProcessor(ACI_A, PNI_A, E164_A, recipientTable)
|
||||
|
||||
@@ -84,6 +84,24 @@ class ContactRecordProcessorTest {
|
||||
assertTrue(result)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `isInvalid, unknown ACI and PNI, true`() {
|
||||
// GIVEN
|
||||
val subject = ContactRecordProcessor(ACI_A, PNI_A, E164_A, recipientTable)
|
||||
|
||||
val record = buildRecord {
|
||||
setAci(ACI.UNKNOWN.toString())
|
||||
setPni(PNI.UNKNOWN.toString())
|
||||
setE164(E164_B)
|
||||
}
|
||||
|
||||
// WHEN
|
||||
val result = subject.isInvalid(record)
|
||||
|
||||
// THEN
|
||||
assertTrue(result)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `isInvalid, e164 matches self, true`() {
|
||||
// GIVEN
|
||||
|
||||
Reference in New Issue
Block a user