tests: Use override for realm_user_settings_defaults.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2024-10-09 15:54:34 -07:00 committed by Anders Kaseorg
parent ddf0fafab7
commit a2c4e3a220
1 changed files with 2 additions and 2 deletions

View File

@ -1320,13 +1320,13 @@ run_test("server_event_dispatch_op_errors", () => {
run_test("realm_user_settings_defaults", ({override}) => {
let event = event_fixtures.realm_user_settings_defaults__emojiset;
realm_user_settings_defaults.emojiset = "text";
override(realm_user_settings_defaults, "emojiset", "text");
override(settings_realm_user_settings_defaults, "update_page", noop);
dispatch(event);
assert_same(realm_user_settings_defaults.emojiset, "google");
event = event_fixtures.realm_user_settings_defaults__notification_sound;
realm_user_settings_defaults.notification_sound = "zulip";
override(realm_user_settings_defaults, "notification_sound", "zulip");
let called = false;
audible_notifications.update_notification_sound_source = () => {
called = true;