mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 21:13:36 +00:00
dispatch test: Restore 100% line coverage (user_status).
We now have 100% coverage on server_events_dispatch.js. The last piece were was covering "status_text" updates in the "user_status" event.
This commit is contained in:
@@ -89,6 +89,7 @@ zrequire('message_store');
|
||||
zrequire('people');
|
||||
zrequire('starred_messages');
|
||||
zrequire('util');
|
||||
zrequire('user_status');
|
||||
zrequire('server_events_dispatch');
|
||||
|
||||
function dispatch(ev) {
|
||||
@@ -1460,4 +1461,14 @@ with_overrides(function (override) {
|
||||
var args = stub.get_args('user_id');
|
||||
assert_same(args.user_id, 63);
|
||||
});
|
||||
|
||||
event = event_fixtures.user_status__set_status_text;
|
||||
global.with_stub(function (stub) {
|
||||
override('activity.redraw_user', stub.f);
|
||||
dispatch(event);
|
||||
var args = stub.get_args('user_id');
|
||||
assert_same(args.user_id, test_user.user_id);
|
||||
var status_text = user_status.get_status_text(test_user.user_id);
|
||||
assert.equal(status_text, 'out to lunch');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -65,6 +65,7 @@ enforce_fully_covered = {
|
||||
'static/js/search.js',
|
||||
'static/js/search_suggestion.js',
|
||||
'static/js/search_util.js',
|
||||
'static/js/server_events_dispatch.js',
|
||||
# Removed because we're migrating code from uncovered other settings pages to here.
|
||||
# 'static/js/settings_ui.js',
|
||||
'static/js/settings_muting.js',
|
||||
|
||||
Reference in New Issue
Block a user