Add test_updating_non_existent_user().

This commit is contained in:
Steve Howell 2016-07-12 20:05:55 -07:00 committed by Tim Abbott
parent 4c8a0340ef
commit f43be3bd8f
1 changed files with 9 additions and 0 deletions

View File

@ -172,6 +172,15 @@ class PermissionTest(AuthedTestCase):
admin_users = user_profile.realm.get_admin_users()
self.assertTrue(user_profile in admin_users)
def test_updating_non_existent_user(self):
# type: () -> None
self.login('hamlet@zulip.com')
admin = get_user_profile_by_email('hamlet@zulip.com')
do_change_is_admin(admin, True)
result = self.client_patch('/json/users/nonexistentuser@zulip.com', {})
self.assert_json_error(result, 'No such user')
def test_admin_api(self):
# type: () -> None
self.login('hamlet@zulip.com')