diff options
author | werner291 <werner.kroneman@gmail.com> | 2019-10-10 14:05:48 +0200 |
---|---|---|
committer | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2019-10-10 13:05:48 +0100 |
commit | b5b03b7079a9baa34a25915d6a569e383e8307c3 (patch) | |
tree | 60fb63809bc9cd861b9d3a227dfd025fb65b4e02 /tests/rest/client/v1 | |
parent | before fulfilling a group invite,check if user is already joined/invited (#3436) (diff) | |
download | synapse-b5b03b7079a9baa34a25915d6a569e383e8307c3.tar.xz |
Add domain validation when creating room with list of invitees (#6121)
Diffstat (limited to 'tests/rest/client/v1')
-rw-r--r-- | tests/rest/client/v1/test_rooms.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/rest/client/v1/test_rooms.py b/tests/rest/client/v1/test_rooms.py index fe741637f5..2f2ca74611 100644 --- a/tests/rest/client/v1/test_rooms.py +++ b/tests/rest/client/v1/test_rooms.py @@ -484,6 +484,15 @@ class RoomsCreateTestCase(RoomBase): self.render(request) self.assertEquals(400, channel.code) + def test_post_room_invitees_invalid_mxid(self): + # POST with invalid invitee, see https://github.com/matrix-org/synapse/issues/4088 + # Note the trailing space in the MXID here! + request, channel = self.make_request( + "POST", "/createRoom", b'{"invite":["@alice:example.com "]}' + ) + self.render(request) + self.assertEquals(400, channel.code) + class RoomTopicTestCase(RoomBase): """ Tests /rooms/$room_id/topic REST events. """ |