diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2020-12-03 15:41:19 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-03 15:41:19 +0000 |
commit | cf3b8156bec7d137894ebc3f6998c3c81a3854aa (patch) | |
tree | 62e18df0e6190c7c79750ac0e65dd0f2de62ad0e /tests/rest | |
parent | Merge pull request #8861 from matrix-org/rav/remove_unused_mocks (diff) | |
download | synapse-cf3b8156bec7d137894ebc3f6998c3c81a3854aa.tar.xz |
Fix errorcode for disabled registration (#8867)
The spec says we should return `M_FORBIDDEN` when someone tries to register and registration is disabled.
Diffstat (limited to 'tests/rest')
-rw-r--r-- | tests/rest/client/v2_alpha/test_register.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/rest/client/v2_alpha/test_register.py b/tests/rest/client/v2_alpha/test_register.py index 8f0c2430e8..bcb21d0ced 100644 --- a/tests/rest/client/v2_alpha/test_register.py +++ b/tests/rest/client/v2_alpha/test_register.py @@ -121,6 +121,7 @@ class RegisterRestServletTestCase(unittest.HomeserverTestCase): self.assertEquals(channel.result["code"], b"403", channel.result) self.assertEquals(channel.json_body["error"], "Registration has been disabled") + self.assertEquals(channel.json_body["errcode"], "M_FORBIDDEN") def test_POST_guest_registration(self): self.hs.config.macaroon_secret_key = "test" |