forked from mystiq/hydrogen-web
more accurate test name and also test >=
This commit is contained in:
parent
099f99a96b
commit
bf84b59e39
1 changed files with 4 additions and 2 deletions
|
@ -98,7 +98,8 @@ export function tests() {
|
||||||
const eventsPowerLevelEvent = {content: {
|
const eventsPowerLevelEvent = {content: {
|
||||||
events_default: 5,
|
events_default: 5,
|
||||||
events: {
|
events: {
|
||||||
"m.room.message": 45
|
"m.room.message": 45,
|
||||||
|
"m.room.topic": 50,
|
||||||
},
|
},
|
||||||
users: {
|
users: {
|
||||||
[alice]: 50,
|
[alice]: 50,
|
||||||
|
@ -138,9 +139,10 @@ export function tests() {
|
||||||
assert.equal(pl.canSendType("m.foo"), true);
|
assert.equal(pl.canSendType("m.foo"), true);
|
||||||
assert.equal(pl.canSendType("m.room.message"), false);
|
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});
|
const pl = new PowerLevels({powerLevelEvent: eventsPowerLevelEvent, ownUserId: alice});
|
||||||
assert.equal(pl.canSendType("m.room.message"), true);
|
assert.equal(pl.canSendType("m.room.message"), true);
|
||||||
|
assert.equal(pl.canSendType("m.room.topic"), true);
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue