Fix people_dict in activity.js tests.

The simulated people_dict in the activity.js test was not
matching the production code, and going forward, we'll want to
share the people_dict setup for all of our tests.

(imported from commit fc21a02216b9422130b9fe9c11bcf80590612844)
This commit is contained in:
Steve Howell 2013-10-23 16:05:57 -04:00
parent 6d511486cb
commit e628efff6c
1 changed files with 12 additions and 7 deletions

View File

@ -20,6 +20,18 @@ set_global('document', {
}
});
set_global('people_dict', new global.Dict.from({
'alice@zulip.com': {
full_name: 'Alice Smith'
},
'fred@zulip.com': {
full_name: "Fred Flintstone"
},
'jill@zulip.com': {
full_name: 'Jill Hill'
}
}));
var activity = require('js/activity.js');
(function test_sort_users() {
@ -31,13 +43,6 @@ var activity = require('js/activity.js');
'jill@zulip.com': 'active'
};
set_global('people_dict', new global.Dict.from({
'alice@zulip.com': 'Alice Smith',
'fred@zulip.com': 'Fred Flintstone',
'jill@zulip.com': 'Jill Hill'
}));
activity._sort_users(users, user_info);
assert.deepEqual(users, [