api.passwd_changed_on user.passwd_changed_on
api.avatar_url gravatar_url(user.mail, {rating: nil, size: nil, default: Setting.gravatar_default}) if Setting.gravatar_enabled?
api.twofa_scheme user.twofa_scheme
+ api.status user.status
render_api_custom_values user.visible_custom_field_values, api
end
json['users'].zip(users) do |user_json, user|
assert_equal user.id, user_json['id']
assert_equal user.updated_on.iso8601, user_json['updated_on']
+ assert_equal user.status, user_json['status']
# No one has changed password.
assert_nil user_json['passwd_changed_on']