summary refs log tree commit diff
path: root/tests/replication
diff options
context:
space:
mode:
authorMark Haines <mjark@negativecurvature.net>2016-04-19 15:22:14 +0100
committerMark Haines <mjark@negativecurvature.net>2016-04-19 15:22:14 +0100
commite99365f6015af6dc0c2c107f47bda3760ff1153e (patch)
tree18e374ed338cce3eba5a6da9a0bcd9ada1107824 /tests/replication
parentAdd self.media_repo to PreviewUrlResource (diff)
downloadsynapse-e99365f6015af6dc0c2c107f47bda3760ff1153e.tar.xz
Replicate get_invited_rooms_for_user
Diffstat (limited to 'tests/replication')
-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