mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 06:23:38 +00:00
api/create-user: Test fixture for "email already in use" error.
In templates/zerver/api/create-user.md, we have a sample fixture for when a client attempts to create a user with the same email as an existing user. This commit adds a test for that fixture. Note that this error payload is specific to client.create_user and this error payload isn't generated anywhere else.
This commit is contained in:
@@ -108,7 +108,13 @@ def create_user(client):
|
||||
result = client.create_user(request)
|
||||
# {code_example|end}
|
||||
|
||||
fixture = FIXTURES['create-user']
|
||||
fixture = FIXTURES['create-user']['successful_response']
|
||||
test_against_fixture(result, fixture)
|
||||
|
||||
# Test "Email already used error"
|
||||
result = client.create_user(request)
|
||||
|
||||
fixture = FIXTURES['create-user']['email_already_used_error']
|
||||
test_against_fixture(result, fixture)
|
||||
|
||||
def get_members(client):
|
||||
|
||||
Reference in New Issue
Block a user