Blur avatar photos from unknown senders when in message request state.

This commit is contained in:
Cody Henthorne
2021-04-23 14:42:51 -04:00
committed by GitHub
parent bf124b87fa
commit ad81b310e3
19 changed files with 546 additions and 113 deletions

View File

@@ -7,6 +7,8 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.annotation.Config;
import org.thoughtcrime.securesms.recipients.Recipient;
import org.thoughtcrime.securesms.recipients.RecipientId;
import java.util.Arrays;
import java.util.Collections;
@@ -111,6 +113,14 @@ public final class SqlUtilTest {
assertArrayEquals(new String[] { "1", "2", "3" }, updateQuery.getWhereArgs());
}
@Test
public void buildCollectionQuery_multipleRecipientIds() {
SqlUtil.Query updateQuery = SqlUtil.buildCollectionQuery("a", Arrays.asList(RecipientId.from(1), RecipientId.from(2), RecipientId.from(3)));
assertEquals("a IN (?, ?, ?)", updateQuery.getWhere());
assertArrayEquals(new String[] { "1", "2", "3" }, updateQuery.getWhereArgs());
}
@Test(expected = IllegalArgumentException.class)
public void buildCollectionQuery_none() {
SqlUtil.buildCollectionQuery("a", Collections.emptyList());