Test that a mark_unread action updates the right counter when using a slave store

This commit is contained in:
Brendan Abolivier 2020-06-12 11:28:26 +01:00
parent 63d9a00bf1
commit 6b1fa3293d
No known key found for this signature in database
GPG Key ID: 1E015C145F1916CD

View File

@ -191,6 +191,21 @@ class SlavedEventStoreTestCase(BaseSlavedStoreTestCase):
{"highlight_count": 1, "notify_count": 2, "unread_count": 2},
)
self.persist(
type="m.room.message",
msgtype="m.text",
body="world",
push_actions=[
(USER_ID_2, ["org.matrix.msc2625.mark_unread"])
],
)
self.replicate()
self.check(
"get_unread_event_push_actions_by_room_for_user",
[ROOM_ID, USER_ID_2, event1.event_id],
{"highlight_count": 1, "notify_count": 2, "unread_count": 3},
)
def test_get_rooms_for_user_with_stream_ordering(self):
"""Check that the cache on get_rooms_for_user_with_stream_ordering is invalidated
by rows in the events stream