node tests: Use mock_template in settings_user_groups.

This commit is contained in:
Steve Howell 2021-06-27 13:51:56 +00:00 committed by Steve Howell
parent fb15d297da
commit 3ec190d30b
1 changed files with 10 additions and 1 deletions

View File

@ -19,7 +19,6 @@ const pills = {
let create_item_handler;
const render_admin_user_group_list = mock_template("/settings/admin_user_group_list.hbs");
const channel = mock_esm("../../static/js/channel");
const confirm_dialog = mock_esm("../../static/js/confirm_dialog");
const input_pill = mock_esm("../../static/js/input_pill");
@ -31,6 +30,9 @@ const user_groups = mock_esm("../../static/js/user_groups", {
});
const ui_report = mock_esm("../../static/js/ui_report");
const render_admin_user_group_list = mock_template("settings/admin_user_group_list.hbs");
const render_confirm_delete_user = mock_template("confirm_dialog/confirm_delete_user.hbs");
const people = zrequire("people");
const settings_config = zrequire("settings_config");
const settings_user_groups = zrequire("settings_user_groups");
@ -518,6 +520,13 @@ test_ui("reset", () => {
});
test_ui("on_events", ({override}) => {
override(render_confirm_delete_user, "f", (data) => {
assert.deepEqual(data, {
group_name: "Mobile",
});
return "stub";
});
override(settings_user_groups, "can_edit", () => true);
(function test_admin_user_group_form_submit_triggered() {