diff options
author | Brendan Abolivier <babolivier@matrix.org> | 2019-07-25 10:03:59 +0200 |
---|---|---|
committer | Brendan Abolivier <babolivier@matrix.org> | 2019-07-25 10:03:59 +0200 |
commit | ddf256c77f9e999181b2d77d6a05e5102855d11b (patch) | |
tree | c37b76fe8b1d250041fe226707ea285c32820374 | |
parent | Only check the join rule on room creation if an access rule is also provided (diff) | |
download | synapse-ddf256c77f9e999181b2d77d6a05e5102855d11b.tar.xz |
Fix status code for forbidden events
-rw-r--r-- | tests/rest/client/test_room_access_rules.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/rest/client/test_room_access_rules.py b/tests/rest/client/test_room_access_rules.py index 96f7ac94d3..7e23add6b7 100644 --- a/tests/rest/client/test_room_access_rules.py +++ b/tests/rest/client/test_room_access_rules.py @@ -181,27 +181,27 @@ class RoomAccessTestCase(unittest.HomeserverTestCase): # Changing access rule to unrestricted should fail. self.change_rule_in_room( - preset_room_id, ACCESS_RULE_UNRESTRICTED, expected_code=400, + preset_room_id, ACCESS_RULE_UNRESTRICTED, expected_code=403, ) self.change_rule_in_room( - init_state_room_id, ACCESS_RULE_UNRESTRICTED, expected_code=400, + init_state_room_id, ACCESS_RULE_UNRESTRICTED, expected_code=403, ) # Changing access rule to direct should fail. self.change_rule_in_room( - preset_room_id, ACCESS_RULE_DIRECT, expected_code=400, + preset_room_id, ACCESS_RULE_DIRECT, expected_code=403, ) self.change_rule_in_room( - init_state_room_id, ACCESS_RULE_DIRECT, expected_code=400, + init_state_room_id, ACCESS_RULE_DIRECT, expected_code=403, ) # Changing join rule to public in an unrestricted room should fail. self.change_join_rule_in_room( - self.unrestricted_room, JoinRules.PUBLIC, expected_code=400, + self.unrestricted_room, JoinRules.PUBLIC, expected_code=403, ) # Changing join rule to public in an direct room should fail. self.change_join_rule_in_room( - self.direct_rooms[0], JoinRules.PUBLIC, expected_code=400, + self.direct_rooms[0], JoinRules.PUBLIC, expected_code=403, ) # Creating a new room with the public_chat preset and an access rule that isn't |