diff --git a/frontend_tests/node_tests/people.js b/frontend_tests/node_tests/people.js index db854ba5ec..fd20a71126 100644 --- a/frontend_tests/node_tests/people.js +++ b/frontend_tests/node_tests/people.js @@ -26,6 +26,10 @@ var _ = global._; }; people.add(orig_person); + var persons = people.get_all_persons(); + assert.equal(_.size(persons), 1); + assert.equal(persons[0].full_name, 'Original'); + var full_name = 'Isaac Newton'; var email = 'isaac@example.com'; var isaac = { diff --git a/static/js/people.js b/static/js/people.js index 82de64173b..eeb9284dff 100644 --- a/static/js/people.js +++ b/static/js/people.js @@ -17,6 +17,10 @@ exports.realm_get = function realm_get(email) { return realm_people_dict.get(email); }; +exports.get_all_persons = function () { + return people_dict.values(); +}; + exports.filter_people_by_search_terms = function (users, search_terms) { var filtered_users = {};