diff --git a/frontend_tests/node_tests/buddy_data.js b/frontend_tests/node_tests/buddy_data.js index d17cdb16c4..8698ae1d52 100644 --- a/frontend_tests/node_tests/buddy_data.js +++ b/frontend_tests/node_tests/buddy_data.js @@ -387,14 +387,19 @@ test("simple search", () => { }); test("muted users excluded from search", () => { + people.add_active_user(selma); muting.add_muted_user(selma.user_id); let user_ids = buddy_data.get_filtered_and_sorted_user_ids(); assert.equal(user_ids.includes(selma.user_id), false); user_ids = buddy_data.get_filtered_and_sorted_user_ids("sel"); assert.deepEqual(user_ids, []); + assert(!buddy_data.matches_filter("sel", selma.user_id)); muting.remove_muted_user(selma.user_id); + user_ids = buddy_data.get_filtered_and_sorted_user_ids("sel"); + assert.deepEqual(user_ids, [selma.user_id]); + assert(buddy_data.matches_filter("sel", selma.user_id)); }); test("bulk_data_hacks", () => {