From e628efff6cc69e2eb19cab5a8b2ea5d44c416fa1 Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Wed, 23 Oct 2013 16:05:57 -0400 Subject: [PATCH] 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) --- zerver/tests/frontend/node/activity.js | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/zerver/tests/frontend/node/activity.js b/zerver/tests/frontend/node/activity.js index d138072904..a964784923 100644 --- a/zerver/tests/frontend/node/activity.js +++ b/zerver/tests/frontend/node/activity.js @@ -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, [