mirror of https://github.com/zulip/zulip.git
Update test_ui_settings to use new abstraction.
This commit is contained in:
parent
006e528e18
commit
24767302c4
|
@ -1011,29 +1011,9 @@ class ChangeSettingsTest(AuthedTestCase):
|
|||
def test_ui_settings(self):
|
||||
self.login("hamlet@zulip.com")
|
||||
|
||||
json_result = self.client.post("/json/ui_settings/change",
|
||||
{"autoscroll_forever": ujson.dumps(True)})
|
||||
self.assert_json_success(json_result)
|
||||
self.assertEqual(get_user_profile_by_email("hamlet@zulip.com").
|
||||
enable_desktop_notifications, True)
|
||||
self.check_for_toggle_param("/json/ui_settings/change", "autoscroll_forever")
|
||||
|
||||
json_result = self.client.post("/json/ui_settings/change",
|
||||
{"autoscroll_forever": ujson.dumps(False)})
|
||||
self.assert_json_success(json_result)
|
||||
self.assertEqual(get_user_profile_by_email("hamlet@zulip.com").
|
||||
autoscroll_forever, False)
|
||||
|
||||
json_result = self.client.post("/json/ui_settings/change",
|
||||
{"default_desktop_notifications": ujson.dumps(True)})
|
||||
self.assert_json_success(json_result)
|
||||
self.assertEqual(get_user_profile_by_email("hamlet@zulip.com").
|
||||
default_desktop_notifications, True)
|
||||
|
||||
json_result = self.client.post("/json/ui_settings/change",
|
||||
{"default_desktop_notifications": ujson.dumps(False)})
|
||||
self.assert_json_success(json_result)
|
||||
self.assertEqual(get_user_profile_by_email("hamlet@zulip.com").
|
||||
default_desktop_notifications, False)
|
||||
self.check_for_toggle_param("/json/ui_settings/change", "default_desktop_notifications")
|
||||
|
||||
def test_missing_params(self):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue