mirror of https://github.com/zulip/zulip.git
tests: Add test_invalid_presence().
This commit is contained in:
parent
edf7ea7f51
commit
7f94c74bf8
|
@ -1589,6 +1589,13 @@ class UserPresenceTests(ZulipTestCase):
|
||||||
for email, presence in json['presences'].items():
|
for email, presence in json['presences'].items():
|
||||||
self.assertEqual(presence, {})
|
self.assertEqual(presence, {})
|
||||||
|
|
||||||
|
def test_invalid_presence(self):
|
||||||
|
# type: () -> None
|
||||||
|
email = "hamlet@zulip.com"
|
||||||
|
self.login(email)
|
||||||
|
result = self.client_post("/json/users/me/presence", {'status': 'foo'})
|
||||||
|
self.assert_json_error(result, 'Invalid presence status: foo')
|
||||||
|
|
||||||
def test_set_idle(self):
|
def test_set_idle(self):
|
||||||
# type: () -> None
|
# type: () -> None
|
||||||
email = "hamlet@zulip.com"
|
email = "hamlet@zulip.com"
|
||||||
|
|
Loading…
Reference in New Issue