user status: Add ability to edit status text.

This commit is contained in:
Steve Howell
2019-01-26 20:14:33 +00:00
committed by Tim Abbott
parent a2751d90c2
commit a964977960
11 changed files with 170 additions and 0 deletions

View File

@@ -118,6 +118,7 @@ zrequire('typing');
zrequire('top_left_corner');
zrequire('starred_messages');
zrequire('user_status');
zrequire('user_status_ui');
zrequire('ui_init');
set_global('$', global.make_zjquery());

View File

@@ -42,10 +42,12 @@ run_test('server', () => {
initialize();
var sent_data;
var success;
channel.post = (opts) => {
sent_data = opts.data;
assert.equal(opts.url, '/json/users/me/status');
success = opts.success;
};
assert.equal(sent_data, undefined);
@@ -55,4 +57,16 @@ run_test('server', () => {
user_status.server_revoke_away();
assert.deepEqual(sent_data, {away: false, status_text: undefined});
var called;
user_status.server_update({
status_text: 'out to lunch',
success: () => {
called = true;
},
});
success();
assert(called);
});