diff options
author | Erik Johnston <erik@matrix.org> | 2014-12-15 15:03:27 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-12-15 15:03:27 +0000 |
commit | 65cdf4e724f3c528aa38d578abd94334d55ce593 (patch) | |
tree | 5018e740cdc853bbcae291c05c687dd12fc49116 /tests/handlers/test_room.py | |
parent | Merge branch 'develop' of github.com:matrix-org/synapse into events_refactor (diff) | |
download | synapse-65cdf4e724f3c528aa38d578abd94334d55ce593.tar.xz |
Get current member state from current_state snapshot. Fix leave test.
Diffstat (limited to '')
-rw-r--r-- | tests/handlers/test_room.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/handlers/test_room.py b/tests/handlers/test_room.py index 21853fdc50..9ae9335e29 100644 --- a/tests/handlers/test_room.py +++ b/tests/handlers/test_room.py @@ -270,7 +270,7 @@ class RoomMemberHandlerTestCase(unittest.TestCase): (RoomMemberEvent.TYPE, "@bob:red"): self._create_member( user_id="@bob:red", room_id=room_id, - membership=Membership.INVITE + membership=Membership.JOIN ), } @@ -297,6 +297,17 @@ class RoomMemberHandlerTestCase(unittest.TestCase): # Actual invocation yield room_handler.change_membership(event, context) + self.federation.handle_new_event.assert_called_once_with( + event, None, destinations=set(['red']) + ) + + self.datastore.persist_event.assert_called_once_with( + event, context=context + ) + self.notifier.on_new_room_event.assert_called_once_with( + event, extra_users=[user] + ) + leave_signal_observer.assert_called_with( user=user, room_id=room_id ) |