mirror of https://github.com/zulip/zulip.git
node tests: Use mock_template in settings_user_groups.
This commit is contained in:
parent
fb15d297da
commit
3ec190d30b
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue