add test for grouping room creation events
This commit is contained in:
parent
be70ef44f8
commit
908ca6b6ef
2 changed files with 114 additions and 2 deletions
|
@ -51,7 +51,7 @@ export function createTestClient() {
|
|||
getUserId: jest.fn().mockReturnValue("@userId:matrix.rog"),
|
||||
|
||||
getPushActionsForEvent: jest.fn(),
|
||||
getRoom: jest.fn().mockReturnValue(mkStubRoom()),
|
||||
getRoom: jest.fn().mockImplementation(mkStubRoom),
|
||||
getRooms: jest.fn().mockReturnValue([]),
|
||||
getVisibleRooms: jest.fn().mockReturnValue([]),
|
||||
getGroups: jest.fn().mockReturnValue([]),
|
||||
|
@ -111,7 +111,7 @@ export function mkEvent(opts) {
|
|||
if (opts.skey) {
|
||||
event.state_key = opts.skey;
|
||||
} else if (["m.room.name", "m.room.topic", "m.room.create", "m.room.join_rules",
|
||||
"m.room.power_levels", "m.room.topic",
|
||||
"m.room.power_levels", "m.room.topic", "m.room.history_visibility", "m.room.encryption",
|
||||
"com.example.state"].indexOf(opts.type) !== -1) {
|
||||
event.state_key = "";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue