mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-27 13:13:43 +00:00
Fix resend after safety number change in groups or distribution lists.
This commit is contained in:
@@ -1,11 +1,17 @@
|
||||
package org.thoughtcrime.securesms.recipients;
|
||||
|
||||
import org.hamcrest.Matcher;
|
||||
import org.hamcrest.MatcherAssert;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.is;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static org.hamcrest.Matchers.contains;
|
||||
import static org.hamcrest.Matchers.hasSize;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertThat;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static java.util.Arrays.asList;
|
||||
import static java.util.Collections.emptyList;
|
||||
@@ -43,6 +49,13 @@ public final class RecipientIdSerializationTest {
|
||||
assertThat(RecipientId.fromSerializedList("123,456"), is(asList(RecipientId.from(123), RecipientId.from(456))));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void fromSerializedList_recipient_serialize() {
|
||||
List<RecipientId> recipientIds = RecipientId.fromSerializedList(RecipientId.from(123).serialize());
|
||||
assertThat(recipientIds, hasSize(1));
|
||||
assertThat(recipientIds, contains(RecipientId.from(123)));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void serializedListContains_empty_list_does_not_contain_item() {
|
||||
assertFalse(RecipientId.serializedListContains("", RecipientId.from(456)));
|
||||
|
||||
Reference in New Issue
Block a user