mirror of
https://github.com/zulip/zulip.git
synced 2025-11-12 18:06:44 +00:00
events: Add test to remove existing value for custom profile field.
Adds a test for when a value for a user's custom profile field is
removed and not set to a new value. The omission of this event in
the tests was noted as a possibility in #22103, which updated the
API documentation for these events having `null` for the field
value.
When adding the test discovered that the events logic was not
deleting the field from the user object and instead setting it to
`None`, so fixes that logic as well. There was a similar bug fixed
in commit 96c61a1a41 for when custom profile fields are removed
from a realm.
This commit is contained in:
committed by
Tim Abbott
parent
c1cd5c527c
commit
195e5b8dc1
@@ -1068,7 +1068,7 @@ check_realm_user_remove = make_checker(realm_user_remove_event)
|
||||
custom_profile_field_type = DictType(
|
||||
required_keys=[
|
||||
("id", int),
|
||||
("value", str),
|
||||
("value", OptionalType(str)),
|
||||
],
|
||||
optional_keys=[
|
||||
("rendered_value", str),
|
||||
|
||||
Reference in New Issue
Block a user