mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
custom profile fields: Pass value as part of a dictionary.
While we're at it, we remove the JSON parsing that was part of the user field code path, since this function isn't responsible for rendering user fields.
This commit is contained in:
committed by
Tim Abbott
parent
bdaeccbca1
commit
28d344b4b5
@@ -591,7 +591,7 @@ run_test('compose_private_stream_alert', () => {
|
||||
|
||||
run_test('custom_user_profile_field', () => {
|
||||
var field = {name: "GitHub user name", id: 2, hint: "Or link to profile"};
|
||||
var args = {field: field, field_value: "@GitHub", field_type: "text"};
|
||||
var args = {field: field, field_value: {value: "@GitHub"}, field_type: "text"};
|
||||
var html = render('custom-user-profile-field', args);
|
||||
assert.equal($(html).attr('data-field-id'), 2);
|
||||
assert.equal($(html).find('.custom_user_field_value').val(), "@GitHub");
|
||||
|
||||
Reference in New Issue
Block a user