diff options
author | Kegan Dougal <kegan@matrix.org> | 2014-11-06 14:52:22 +0000 |
---|---|---|
committer | Kegan Dougal <kegan@matrix.org> | 2014-11-06 14:52:22 +0000 |
commit | e3c3f5a6d04bfbc0256010e9fb4dad7616ebbcc5 (patch) | |
tree | 25716cfbd85da66da6af8732d858780c82f56401 /syweb/webclient/test/unit/event-handler-service.spec.js | |
parent | Use mRoomName on join notifications as well. (diff) | |
download | synapse-e3c3f5a6d04bfbc0256010e9fb4dad7616ebbcc5.tar.xz |
Swap from using raw m.room.member events for room members to using actual RoomMember objects, so User objects can be tacked on. Update tests.
Diffstat (limited to 'syweb/webclient/test/unit/event-handler-service.spec.js')
-rw-r--r-- | syweb/webclient/test/unit/event-handler-service.spec.js | 38 |
1 files changed, 25 insertions, 13 deletions
diff --git a/syweb/webclient/test/unit/event-handler-service.spec.js b/syweb/webclient/test/unit/event-handler-service.spec.js index 023abec98b..2a4dc3b5a5 100644 --- a/syweb/webclient/test/unit/event-handler-service.spec.js +++ b/syweb/webclient/test/unit/event-handler-service.spec.js @@ -36,20 +36,28 @@ describe('EventHandlerService', function() { current_room_state: { members: { "@adam:matrix.org": { - content: { membership: "join" }, - user_id: "@adam:matrix.org" + event: { + content: { membership: "join" }, + user_id: "@adam:matrix.org" + } }, "@beth:matrix.org": { - content: { membership: "invite" }, - user_id: "@beth:matrix.org" + event: { + content: { membership: "invite" }, + user_id: "@beth:matrix.org" + } }, "@charlie:matrix.org": { - content: { membership: "join" }, - user_id: "@charlie:matrix.org" + event: { + content: { membership: "join" }, + user_id: "@charlie:matrix.org" + } }, "@danice:matrix.org": { - content: { membership: "leave" }, - user_id: "@danice:matrix.org" + event: { + content: { membership: "leave" }, + user_id: "@danice:matrix.org" + } } } } @@ -70,12 +78,16 @@ describe('EventHandlerService', function() { current_room_state: { members: { "@adam:matrix.org": { - content: { membership: "join" }, - user_id: "@adam:matrix.org" + event: { + content: { membership: "join" }, + user_id: "@adam:matrix.org" + } }, "@beth:matrix.org": { - content: { membership: "join" }, - user_id: "@beth:matrix.org" + event: { + content: { membership: "join" }, + user_id: "@beth:matrix.org" + } } }, s: { @@ -102,4 +114,4 @@ describe('EventHandlerService', function() { num = eventHandlerService.getUserPowerLevel(roomId, "@unknown:matrix.org"); expect(num).toEqual(50); })); -}); \ No newline at end of file +}); |