mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
test_events.py: Add a test for the do_change_realm_alias() function.
This commit is contained in:
committed by
Tim Abbott
parent
fec145fc0c
commit
21dccaedd1
@@ -314,6 +314,10 @@ def apply_events(state, events, user_profile):
|
||||
elif event['type'] == "realm_domains":
|
||||
if event['op'] == 'add':
|
||||
state['realm_domains'].append(event['alias'])
|
||||
elif event['op'] == 'change':
|
||||
for realm_domain in state['realm_domains']:
|
||||
if realm_domain['domain'] == event['alias']['domain']:
|
||||
realm_domain['allow_subdomains'] = event['alias']['allow_subdomains']
|
||||
elif event['op'] == 'remove':
|
||||
state['realm_domains'] = [alias for alias in state['realm_domains'] if alias['domain'] != event['domain']]
|
||||
elif event['type'] == "realm_emoji":
|
||||
|
||||
Reference in New Issue
Block a user