mirror of https://github.com/zulip/zulip.git
node tests: Fix false positive for muted user.
The test was passing here because we didn't add selma. We want to make sure it's due to the actual muting.
This commit is contained in:
parent
9825be339b
commit
eee8ff40b4
|
@ -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", () => {
|
||||
|
|
Loading…
Reference in New Issue