From bf84b59e39d66ddfadc84803a5c956bf4f1f6efe Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 17 Jun 2021 09:59:24 +0200 Subject: [PATCH] more accurate test name and also test >= --- src/matrix/room/timeline/PowerLevels.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/matrix/room/timeline/PowerLevels.js b/src/matrix/room/timeline/PowerLevels.js index 9161c8ed..f2315c38 100644 --- a/src/matrix/room/timeline/PowerLevels.js +++ b/src/matrix/room/timeline/PowerLevels.js @@ -98,7 +98,8 @@ export function tests() { const eventsPowerLevelEvent = {content: { events_default: 5, events: { - "m.room.message": 45 + "m.room.message": 45, + "m.room.topic": 50, }, users: { [alice]: 50, @@ -138,9 +139,10 @@ export function tests() { assert.equal(pl.canSendType("m.foo"), true); assert.equal(pl.canSendType("m.room.message"), false); }, - "can send event below events[type]": assert => { + "can send event above or at events[type]": assert => { const pl = new PowerLevels({powerLevelEvent: eventsPowerLevelEvent, ownUserId: alice}); assert.equal(pl.canSendType("m.room.message"), true); + assert.equal(pl.canSendType("m.room.topic"), true); }, } }