mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-27 05:03:28 +00:00
Remove Message Requests feature flag.
This commit is contained in:
committed by
Greyson Parrelli
parent
f2fe81d9b5
commit
3d7cffef2b
@@ -41,26 +41,12 @@ public class RecipientUtilTest {
|
||||
when(DatabaseFactory.getThreadDatabase(any())).thenReturn(mockThreadDatabase);
|
||||
when(DatabaseFactory.getMmsSmsDatabase(any())).thenReturn(mockMmsSmsDatabase);
|
||||
when(DatabaseFactory.getRecipientDatabase(any())).thenReturn(mockRecipientDatabase);
|
||||
|
||||
mockStatic(FeatureFlags.class);
|
||||
when(FeatureFlags.messageRequests()).thenReturn(true);
|
||||
|
||||
when(recipient.getId()).thenReturn(RecipientId.from(5));
|
||||
when(recipient.resolve()).thenReturn(recipient);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenMessageRequestsFlagDisabled_whenIsThreadMessageRequestAccepted_thenIExpectTrue() {
|
||||
// GIVEN
|
||||
when(FeatureFlags.messageRequests()).thenReturn(false);
|
||||
|
||||
// WHEN
|
||||
boolean result = RecipientUtil.isMessageRequestAccepted(context, 1);
|
||||
|
||||
// THEN
|
||||
assertTrue(result);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenThreadIsNegativeOne_whenIsThreadMessageRequestAccepted_thenIExpectTrue() {
|
||||
// WHEN
|
||||
@@ -158,18 +144,6 @@ public class RecipientUtilTest {
|
||||
assertTrue(result);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenMessageRequestsFlagIsOff_whenIsRecipientMessageRequestAccepted_thenIExpectTrue() {
|
||||
// GIVEN
|
||||
when(FeatureFlags.messageRequests()).thenReturn(false);
|
||||
|
||||
// WHEN
|
||||
boolean result = RecipientUtil.isMessageRequestAccepted(context, recipient);
|
||||
|
||||
// THEN
|
||||
assertTrue(result);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenNonZeroOutgoingSecureMessageCount_whenIsRecipientMessageRequestAccepted_thenIExpectTrue() {
|
||||
// GIVEN
|
||||
|
||||
Reference in New Issue
Block a user