summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorMark Haines <mjark@negativecurvature.net>2016-04-19 15:46:00 +0100
committerMark Haines <mjark@negativecurvature.net>2016-04-19 15:46:00 +0100
commit4084c58aa116988c94764bdc76cd85769599d871 (patch)
tree18e374ed338cce3eba5a6da9a0bcd9ada1107824 /tests
parentAdd self.media_repo to PreviewUrlResource (diff)
parentReplicate get_invited_rooms_for_user (diff)
downloadsynapse-4084c58aa116988c94764bdc76cd85769599d871.tar.xz
Merge pull request #736 from matrix-org/markjh/slave_invited_rooms_for_user
Replicate get_invited_rooms_for_user
Diffstat (limited to 'tests')
-rw-r--r--tests/replication/slave/storage/test_events.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/replication/slave/storage/test_events.py b/tests/replication/slave/storage/test_events.py
index baa4a26eb5..88b8d08110 100644
--- a/tests/replication/slave/storage/test_events.py
+++ b/tests/replication/slave/storage/test_events.py
@@ -251,6 +251,18 @@ class SlavedEventStoreTestCase(BaseSlavedStoreTestCase):
         redacted = FrozenEvent(msg_dict, msg.internal_metadata.get_dict())
         yield self.check("get_event", [msg.event_id], redacted)
 
+    @defer.inlineCallbacks
+    def test_invites(self):
+        yield self.check("get_invited_rooms_for_user", [USER_ID_2], [])
+        event = yield self.persist(
+            type="m.room.member", key=USER_ID_2, membership="invite"
+        )
+        yield self.replicate()
+        yield self.check("get_invited_rooms_for_user", [USER_ID_2], [RoomsForUser(
+            ROOM_ID, USER_ID, "invite", event.event_id,
+            event.internal_metadata.stream_ordering
+        )])
+
     event_id = 0
 
     @defer.inlineCallbacks