diff options
author | Shay <hillerys@element.io> | 2024-03-19 10:55:31 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-19 17:55:31 +0000 |
commit | cf5adc80e1a362eb651abdb6d84b2397434a7f45 (patch) | |
tree | 5f75e6308ac011df789b868854ea3149309f36de /tests | |
parent | Improve event validation (#16908) (diff) | |
download | synapse-cf5adc80e1a362eb651abdb6d84b2397434a7f45.tar.xz |
Update power level default for public rooms (#16907)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/rest/client/test_rooms.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/rest/client/test_rooms.py b/tests/rest/client/test_rooms.py index d2f2ded487..1364615085 100644 --- a/tests/rest/client/test_rooms.py +++ b/tests/rest/client/test_rooms.py @@ -93,6 +93,7 @@ class RoomPermissionsTestCase(RoomBase): rmcreator_id = "@notme:red" def prepare(self, reactor: MemoryReactor, clock: Clock, hs: HomeServer) -> None: + self.store_controllers = hs.get_storage_controllers() self.helper.auth_user_id = self.rmcreator_id # create some rooms under the name rmcreator_id self.uncreated_rmid = "!aa:test" @@ -482,6 +483,23 @@ class RoomPermissionsTestCase(RoomBase): expect_code=HTTPStatus.OK, ) + def test_default_call_invite_power_level(self) -> None: + pl_event = self.get_success( + self.store_controllers.state.get_current_state_event( + self.created_public_rmid, EventTypes.PowerLevels, "" + ) + ) + assert pl_event is not None + self.assertEqual(50, pl_event.content.get("m.call.invite")) + + private_pl_event = self.get_success( + self.store_controllers.state.get_current_state_event( + self.created_rmid, EventTypes.PowerLevels, "" + ) + ) + assert private_pl_event is not None + self.assertEqual(None, private_pl_event.content.get("m.call.invite")) + class RoomStateTestCase(RoomBase): """Tests /rooms/$room_id/state.""" |