mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-29 11:28:14 +00:00
Change position of GroupsV2 leave update message.
This commit is contained in:
committed by
Greyson Parrelli
parent
8cb9ab3204
commit
745a7f76ea
@@ -767,6 +767,30 @@ public final class GroupsV2UpdateMessageProducerTest {
|
||||
"Alice changed who can edit group membership to \"All members\".")));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void multiple_changes_leave_and_promote() {
|
||||
DecryptedGroupChange change = changeBy(alice)
|
||||
.deleteMember(alice)
|
||||
.promoteToAdmin(bob)
|
||||
.build();
|
||||
|
||||
assertThat(describeChange(change), is(Arrays.asList(
|
||||
"Alice made Bob an admin.",
|
||||
"Alice left the group.")));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void multiple_changes_leave_and_promote_by_unknown() {
|
||||
DecryptedGroupChange change = changeByUnknown()
|
||||
.deleteMember(alice)
|
||||
.promoteToAdmin(bob)
|
||||
.build();
|
||||
|
||||
assertThat(describeChange(change), is(Arrays.asList(
|
||||
"Bob is now an admin.",
|
||||
"Alice is no longer in the group.")));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void multiple_changes_by_unknown() {
|
||||
DecryptedGroupChange change = changeByUnknown()
|
||||
@@ -785,6 +809,22 @@ public final class GroupsV2UpdateMessageProducerTest {
|
||||
"Who can edit group membership has been changed to \"All members\".")));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void multiple_changes_join_and_leave_by_unknown() {
|
||||
DecryptedGroupChange change = changeByUnknown()
|
||||
.addMember(alice)
|
||||
.promoteToAdmin(alice)
|
||||
.deleteMember(alice)
|
||||
.title("Updated title")
|
||||
.build();
|
||||
|
||||
assertThat(describeChange(change), is(Arrays.asList(
|
||||
"Alice joined the group.",
|
||||
"Alice is now an admin.",
|
||||
"The group name has changed to \"Updated title\".",
|
||||
"Alice is no longer in the group.")));
|
||||
}
|
||||
|
||||
// Group state without a change record
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user