Skip to content

Commit

Permalink
amend test to reflect bot not demoting itself
Browse files Browse the repository at this point in the history
  • Loading branch information
H-Shay committed Nov 6, 2024
1 parent b7ac833 commit 11b4cde
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions test/integration/commands/powerLevelCommandTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ describe("Test: power levels", function () {
mod.stop();
});

it("Does allow the bot to demote itself or members of management room in a protected room with a --force argument.", async function () {
it("Does allow the bot to demote members of management room in a protected room with a --force argument.", async function () {
this.timeout(60000);
const mod = await newTestUser(this.config.homeserverUrl, { name: { contains: "force-moderator" } });
const mod2 = await newTestUser(this.config.homeserverUrl, { name: { contains: "force-moderator2" } });
Expand Down Expand Up @@ -116,16 +116,6 @@ describe("Test: power levels", function () {
const mod2Level = currentLevels["users"][mod2Id];
assert.equal(mod2Level, 50);

await getFirstReaction(mod, this.mjolnir.managementRoomId, "✅", async () => {
return await mod.sendMessage(this.mjolnir.managementRoomId, {
msgtype: "m.text",
body: `!mjolnir powerlevel ${botId} 50 ${targetRoom} --force`,
});
});
currentLevels = await mod.getRoomStateEvent(targetRoom, "m.room.power_levels", "");
const botLevel = currentLevels["users"][botId];
assert.equal(botLevel, 50);

mod.stop();
});
});

0 comments on commit 11b4cde

Please sign in to comment.